If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
TaviO!
Posts: 12 Joined: Sun Sep 20, 2009 6:53 pm
Post
by TaviO! » Sun Sep 20, 2009 6:55 pm
Say I have a triangle with normal X. How do I rotate so it has a given normal Y?
hybrid
Admin
Posts: 14143 Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:
Post
by hybrid » Sun Sep 20, 2009 7:16 pm
You can use the quaternion function to get the rotation necessary to get one vector to another. The apply this rotation to the node. If the rotation is bound to one axis you could use the vector class to get the values as well.
TaviO!
Posts: 12 Joined: Sun Sep 20, 2009 6:53 pm
Post
by TaviO! » Sun Sep 20, 2009 7:43 pm
How do I apply the 4x4 rotation matrix to the node?
The setPosition method only accepts a vector3df.
Thanks for the answer!
TaviO!
Posts: 12 Joined: Sun Sep 20, 2009 6:53 pm
Post
by TaviO! » Sun Sep 20, 2009 8:03 pm
Nevermind, the matrix had a getRotationDegrees method that returns what I need for the setRotation method on the node.
Thanks!