using rotation matrix directly in setRotation()

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.
Post Reply
mangoesfruit
Posts: 19
Joined: Sat Aug 21, 2021 11:16 pm

using rotation matrix directly in setRotation()

Post by mangoesfruit »

Hallo
Is it p
Last edited by mangoesfruit on Tue Aug 31, 2021 4:46 pm, edited 1 time in total.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: using rotation matrix directly in setRotation()

Post by CuteAlien »

Unfortunately no, because internally ISceneNode saves position, rotation and scale instead of a matrix and just calculates the matrix from those when needed. It is possible to use an IDummyTransformationSceneNode as parent which accepts matrices directly. That has a bit overhead as the matrix is then multiplied by the scenenode matrix, but if you don't have too many nodes it won't matter much.
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
mangoesfruit
Posts: 19
Joined: Sat Aug 21, 2021 11:16 pm

Re: using rotation matrix directly in setRotation()

Post by mangoesfruit »

ok
Last edited by mangoesfruit on Tue Aug 31, 2021 4:47 pm, edited 2 times in total.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: using rotation matrix directly in setRotation()

Post by CuteAlien »

You can use the quaternion::toEuler function if it's only about rotations and wanting to work with quaternions in your code.
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
Post Reply