Turning toward coordinates
-
- Posts: 19
- Joined: Fri Nov 24, 2006 9:33 am
Turning toward coordinates
How can I turn a mesh toward certain coordinates?
get the nodes current rotation
find out what the final rotation needs to be( can be found by taking the target object you want to look at, subtracting the current nodes position and normalizing that vector. Then you can use the vector functions for getting the angles from said vector )
the node needs angular rotation per second speed, take the nodes current rotation and add to it, the said angular rotation per second( accounting for time between renders and the difference between the current and final rotations )
find out what the final rotation needs to be( can be found by taking the target object you want to look at, subtracting the current nodes position and normalizing that vector. Then you can use the vector functions for getting the angles from said vector )
the node needs angular rotation per second speed, take the nodes current rotation and add to it, the said angular rotation per second( accounting for time between renders and the difference between the current and final rotations )