Rotation quaternions affecting gravity vector of physics objects?

Update: I discovered it is actually the pivot point. I’m not exactly sure why it’s doing this, though.

Initially I believed this was a collision filtering issue, but I just figured out what was causing this. I believe the rotation quaternions are causing the gravity vector to apply to the cylinders at an angle. Is there a way to prevent this from happening? I have to be able to update the rotation quaternions multiple times after the physics impostor is created. Any help or suggestions are greatly appreciated.

Link to example playground Playground

cc @Cedric our Physix Guru

1 Like

There is something weird with the pivot.
Can you try to use cylinder3.physicsImpostor.setDeltaPosition(new BABYLON.Vector3(0,-0.05,0)); instead of doing a call to setPivotPoint ?

1 Like

Hi! I attempted that in my full project, it just exploded in a different way. Is there a way to get maybe a vector of the angles of rotation axis from the rotation quaternions? I was trying to find something in the documentation to do that so I can manually position the cylinder. Also, thanks for the help!

Do you mean getting Euler angles from a quaternion?

2 Likes

Hello @hexenc0de just checking in if you need any more help?