Strange rotations with ODE integration

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

Strange rotations with ODE integration

Post by mangoesfruit »

Hallo

Apologize if this isn't the ideal place to post this, i am not sure where is best. I have integrated O
Last edited by mangoesfruit on Tue Aug 31, 2021 4:46 pm, edited 1 time in total.
CuteAlien
Admin
Posts: 9645
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Strange rotations with ODE integration

Post by CuteAlien »

Uh... there can be several things which could go wrong. First of all - in your example code you don't set angles to anything - I guess you forgot that step when copy-pasting? Next one is a pretty common problem - rotations can be left-handed or right-handed. So could be worth trying to use minus for the 4th quaternion value (thought it doesn't look like that to me).
And my main guess - you simply freeze too early. Physics engines tend to stop calculating objects when they think the object has found a stable place (otherwise they would have to calculate each object every time which is way too expensive in large scenes). But that's usually some value you can tune and the default might not work well for your scene. It looks a bit like that - hits the floor, thinks it's stable and stops. So check if ODE has such a parameter.
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: Strange rotations with ODE integration

Post by mangoesfruit »

apologiez, the ()
Last edited by mangoesfruit on Tue Aug 31, 2021 4:45 pm, edited 2 times in total.
CuteAlien
Admin
Posts: 9645
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Strange rotations with ODE integration

Post by CuteAlien »

Hm, yeah - the jiggling looks rather like the freeze value is even too late. No immediate idea then... (been a decade since I last used ODE).
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