mercredi 28 janvier 2015

Move object in circular motion

I often use the following code to move an object in a circular motion.



vector.x = vector.x * Math.cos(.25) - vector.z * Math.sin(.25);
vector.z = vector.z * Math.cos(.25) + vector.x * Math.sin(.25);


This moves the object perpendicular to the bottom of my scene. How can I get my object to move in a circular motion through the y plane. I'm not sure how to correctly phrase that.


Aucun commentaire:

Enregistrer un commentaire