Why do I need to invert the X axis scale?

Jonathan
Posts: 36
Joined: Sun Feb 10, 2013 6:52 pm

Why do I need to invert the X axis scale?

Post by Jonathan »

I think I've almost got bullet fully integrated into my game server, but ran into a problem today that was driving me INSANE! :twisted:

I have meshes I create in Blender, export to .bullet, and import using BulletWorldImporter. When I was moving my client through the game, I noticed the collision meshes were completely wrong... I looked through all possible rotations and position offsets... nothing seemed to work. After more investigating, I finally realized that the mesh was somehow completely flipped across its X axis. So to fix it, when I import the .bullet file, I just set

Code: Select all

 btCollisionShape->setLocalScaling (btVector3 (-1.0 , 1.0 , 1.0)) 
WHY do I have to do this though? Am I treating a symptom or the actual problem? Shouldn't all of Bullet's code in Blender and BulletWorldImport ensure that an exported mesh is recreated identically?
Mako_energy02
Posts: 171
Joined: Sun Jan 17, 2010 4:47 am

Re: Why do I need to invert the X axis scale?

Post by Mako_energy02 »

That shouldn't be necessary. I think you are treating the symptom. If I had to guess I'd say something went wrong with the export from blender.
STTrife
Posts: 109
Joined: Tue May 01, 2012 10:42 am

Re: Why do I need to invert the X axis scale?

Post by STTrife »

Could it be a righthanded/lefthanded coordinate system problem?
Jonathan
Posts: 36
Joined: Sun Feb 10, 2013 6:52 pm

Re: Why do I need to invert the X axis scale?

Post by Jonathan »

STTrife wrote:Could it be a righthanded/lefthanded coordinate system problem?
Ah yes, that's exactly what is happening. (Not bullet's fault.) Thank you! :)