Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在创建一个 2d 横向卷轴游戏。我在空间中有一个点(鼠标所在的位置),我需要武器来查看并“跟随”该点。
有谁知道从哪里开始?
wikihow:如何找到两个向量之间的角度
有了角度后,就可以适当地旋转要旋转的东西了。
我不确定javascript是否也有一个atan2(x,y)函数,可以用来获取角度。
atan2(x,y)