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

后端 未结 10 1826
后悔当初
后悔当初 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条回答
  •  失恋的感觉
    2020-12-02 07:40

    Recommend:

     public static Vector3 RotatePointAroundPivot(Vector3 point, Vector3 
    pivot, Vector3 angles)
        {
    	    return Quaternion.Euler(angles) * (point - pivot) + pivot;
        }

提交回复
热议问题