I can't remember right now what I needed the quaternion one for. Maybe was just a stupid solution (I also struggled with this ... back then even more). getRelativeRotation with setting old rotation to 0,0,0 and then using result in applyRelativeRotation might kinda work for what you need, not sure.
Matrix order is very important, you have to get that one right. As it means "apply this operation after the previous one". And as you noticed already order of rotations matters.
edit: Maybe you can simplify it for your case by kicking out the scale parts (if you know they are 1,1,1).
Matrix Rotation Around Local Axes
Re: Matrix Rotation Around Local Axes
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Matrix Rotation Around Local Axes
I can't get it to work...
I tried each possible multiplication order (TXYZ, TZYX, XYZT, ZYXT)...
I also tried with/without scale...
I ported all needed functions from the Irrlicht matrix to Java...
no success !!!
I have no clue what's wrong...
I tried each possible multiplication order (TXYZ, TZYX, XYZT, ZYXT)...
I also tried with/without scale...
I ported all needed functions from the Irrlicht matrix to Java...
no success !!!
I have no clue what's wrong...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Re: Matrix Rotation Around Local Axes
Put a few test-cases around each function and check if you really get same results.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Matrix Rotation Around Local Axes
what test cases?
I don't get the same results when I change the order...
but it's always wrong...
I don't get the same results when I change the order...
but it's always wrong...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Re: Matrix Rotation Around Local Axes
Well - you ported the functions to Java. Just call them with a bunch of random parameter to see if you really get same results.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Matrix Rotation Around Local Axes
ok, I made some test cases on Irrlicht, and then the same with my Java code...
and it turned out, the calculations were correct (same results)...
and now I get THIS:
https://www.youtube.com/watch?v=VrErHDAswP0
I hope you don't mind having one last look at this video...
I won't bother you with this anymore, promised !!!
thanks for the help !!!
and it turned out, the calculations were correct (same results)...
and now I get THIS:
https://www.youtube.com/watch?v=VrErHDAswP0
I hope you don't mind having one last look at this video...
I won't bother you with this anymore, promised !!!
thanks for the help !!!
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Re: Matrix Rotation Around Local Axes
haha - thanks, nice to see :-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Matrix Rotation Around Local Axes
I had to reverse my rotation order in the render loop from ZYX to XYZ...
but when I change the order in the matrix instead the calculation gives wrong values...
no big deal I can live with the render order XYZ...
but I have to change a few other things also now...
for example...
now I get wrong results calculating the absolute transformation of a scene node...
but I think I should get this to work...
or it may be another topic to bother you with...
bye!
but when I change the order in the matrix instead the calculation gives wrong values...
no big deal I can live with the render order XYZ...
but I have to change a few other things also now...
for example...
now I get wrong results calculating the absolute transformation of a scene node...
but I think I should get this to work...
or it may be another topic to bother you with...
bye!
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Re: Matrix Rotation Around Local Axes
I wrote something similar long time ago, these may be of some help:
To rotate / revolve node in world space & in local space:
http://irrlicht.sourceforge.net/forum/v ... =9&t=47924
Look at rotateNodeInLocalSpace() or revolveNodeInLocalSpace()
Regards,
smso
To rotate / revolve node in world space & in local space:
http://irrlicht.sourceforge.net/forum/v ... =9&t=47924
Look at rotateNodeInLocalSpace() or revolveNodeInLocalSpace()
Regards,
smso