Is it possible to rotate a mesh with absolute values? When I rotate a die around a board, as soon as I perform a sideways rotation, the axis gets shifted and I can no longer roll in the correct direction.
Thanks,
Will
Absolute rotation of a mesh
If you are going to do more complex rotations, you need to dig out a maths book and read up on transformation matrices. Or Google it, whatever. When you apply a rotation to an object, what you are actually doing is creating a 4x4 matrix that transforms the coordinates of each vertex (in world space).
Pinky
Pinky
Intellectuals solve problems - geniuses prevent them. -- Einstein
#irrlicht on irc.freenode.net
#irrlicht on irc.freenode.net
-
- Posts: 8
- Joined: Fri Oct 13, 2006 3:12 pm
I am struggling with this as well. Say I have a simple cube and I want it roll correctly towards a certain direction, how would I figure out how to rotate it? When I rotate just by a single axis it works OK, but when I add another axis it all goes to nuts.
I have tried to google, but I can't find a good example.
I have tried to google, but I can't find a good example.
-
- Posts: 8
- Joined: Fri Oct 13, 2006 3:12 pm
This topic got me going:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=12629
I still don't have rolling, but the cube now turns to right direction...
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=12629
I still don't have rolling, but the cube now turns to right direction...