Find the point on a circle with given center point, radius, and degree

后端 未结 10 1855
后悔当初
后悔当初 2020-12-02 06:57

It\'s been 10 years since I did any math like this... I am programming a game in 2D and moving a player around. As I move the player around I am trying to calculate the poin

10条回答
  •  猫巷女王i
    2020-12-02 07:42

    The answer should be exactly opposite.

    X = Xc + rSin(angle)

    Y = Yc + rCos(angle)

    where Xc and Yc are circle's center coordinates and r is the radius.

提交回复
热议问题