- #1
Zoltan
- 6
- 0
Hi guys, i would need some help with movement on ellipse.
I am using basicequation for figuring out position on ellipse :
basically getting degree, converting that to radians and using radians to figure out posX and Y. Basic stuff.
degree += speed * Time;
radian = (degree/180.0f) * Mathf.PI;
posX = Mathf.Cos(radian) * circleRadiusX;
posY = Mathf.Sin(radian) * circleRadiusY;
But this results in non linear motion speed. I.e. it gets slower around the larger radius, but i would need the speed to be equal all the time ( means point on ellipse finish the 360 degrees in same amount of time as before but with equal speed ( step size ) all the way ).
Any help greatly appreciated.
Thank you
Zoltan
I am using basicequation for figuring out position on ellipse :
basically getting degree, converting that to radians and using radians to figure out posX and Y. Basic stuff.
degree += speed * Time;
radian = (degree/180.0f) * Mathf.PI;
posX = Mathf.Cos(radian) * circleRadiusX;
posY = Mathf.Sin(radian) * circleRadiusY;
But this results in non linear motion speed. I.e. it gets slower around the larger radius, but i would need the speed to be equal all the time ( means point on ellipse finish the 360 degrees in same amount of time as before but with equal speed ( step size ) all the way ).
Any help greatly appreciated.
Thank you
Zoltan
Last edited: