Hallo
Apologize if this isn't the ideal place to post this, i am not sure where is best. I have integrated O
Strange rotations with ODE integration
-
- Posts: 19
- Joined: Sat Aug 21, 2021 11:16 pm
Strange rotations with ODE integration
Last edited by mangoesfruit on Tue Aug 31, 2021 4:46 pm, edited 1 time in total.
Re: Strange rotations with ODE integration
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.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 19
- Joined: Sat Aug 21, 2021 11:16 pm
Re: Strange rotations with ODE integration
apologiez, the ()
Last edited by mangoesfruit on Tue Aug 31, 2021 4:45 pm, edited 2 times in total.
Re: Strange rotations with ODE integration
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm