i have a cubescenenode and i want to rotate it like a triangle, so the surface of the node is parallel to the triangle.
So how can i get the rotation of the triangle?
________
Starcraft 2 replays
get rotation of a triangle
get rotation of a triangle
Last edited by katze555 on Thu Feb 24, 2011 7:43 am, edited 1 time in total.
Get the orthornormal basis for your triangle (the up, left and forward vectors) in the coordinate system of the cube's parent, and then rotate the cube into alignment.
You could probably do this by using getting the world rotations of the triangle and cube as quaternions, and then finding the difference, applying this to the cube.
Travis
You could probably do this by using getting the world rotations of the triangle and cube as quaternions, and then finding the difference, applying this to the cube.
Travis