Gunwizard
06-08-2007 08:24:03
Hello OgreBullet developers,
We are using the Bullet engine and the OgreBullet wrapper for a multiplayer game called "Verdun-Online" (http://www.verdun-online.com/index.php)
However, i have quite a strange problem atm. In short, the synchronisation of Bullet's rigid bodies and Ogre's scene nodes is messed up. I slightly modified the wrapper classes so far and i probably made a silly mistake there, but i can't see where the problem is.
The orientation of rigid bodies, though correctly set to identity at the start, simply doesn't fit the display of debug objects/meshes. I tried to use the inverse transform for the display of debug shapes, which somehow aligns them to the aabbs again, but that doesn't seem to be the real problem.
Also the bodies are positioned correctly, but rotate in the wrong direction, when torque is applied or when they collide. As far as i could figure out, the axes are swapped from (x,y,z) to (-z,y,-x), actually making the coordinate system left-handed (sic!)
This might be related to the fact that we use the Z-axis for the up direction instead of Y (Ogre's standard), but i can't see where this causes trouble . I used
Does someone have similar problems ? Any hints and ideas are appreciated. Thanks for your help in advance
Best regards
Lukas Toenne
We are using the Bullet engine and the OgreBullet wrapper for a multiplayer game called "Verdun-Online" (http://www.verdun-online.com/index.php)
However, i have quite a strange problem atm. In short, the synchronisation of Bullet's rigid bodies and Ogre's scene nodes is messed up. I slightly modified the wrapper classes so far and i probably made a silly mistake there, but i can't see where the problem is.
The orientation of rigid bodies, though correctly set to identity at the start, simply doesn't fit the display of debug objects/meshes. I tried to use the inverse transform for the display of debug shapes, which somehow aligns them to the aabbs again, but that doesn't seem to be the real problem.
Also the bodies are positioned correctly, but rotate in the wrong direction, when torque is applied or when they collide. As far as i could figure out, the axes are swapped from (x,y,z) to (-z,y,-x), actually making the coordinate system left-handed (sic!)
This might be related to the fact that we use the Z-axis for the up direction instead of Y (Ogre's standard), but i can't see where this causes trouble . I used
SceneNode::setFixedYawAxis(true, Ogre::Vector3::UNIT_Z);
but i don't think this should have any influence since nodes are not yawed/pitched/rolled by Bullet/OgreBullet. Sorry for not posting much code here, but it's just not that different from the original wrapper.Does someone have similar problems ? Any hints and ideas are appreciated. Thanks for your help in advance
Best regards
Lukas Toenne