Bullet Physics Release vs Debug

Started by
2 comments, last by CastorX1987 9 years, 1 month ago

I wanted to create a simple physics demo using compound shapes.

The ground is a static compound shape with one child Triangle mesh. The secene has spheres and cubes, every one is a combined shape with one child shape (box or sphere).

Now the simulation:

- Before starting the simulation I add the ground and cubes to the scene.

- Later I shoot spheres into the scene

The speheres collide with the ground BUT DO NOT COLLIDE NOT WITH THE cubes... and this problem appears ONLY in release mode. In debug mode everyting is fine. It is also all right when I add a few speheres before starting the simulation.

Did anyone faced the same problem before? Any suggestions?

(There is definately no difference in my source code between the release and the debug mode compilation.)

Thank you in advance!

Advertisement
I wonder if you are missing setting the member of a struct to initialise an object? That could always be set to zero in debug but not in release or similar.

Can be but I did not find a solution yet.

If I use this:

compoundShape->addChildShape(btTransform(btQuaternion(0,0,0,1), btVector3(0, 0, 0)), currShape);

...

model->BtCollisionShape = compoundShape; // Use the compound shape as collision shape of our model

the the problem is present in release mode.

However if I use this:

retMod->BtCollisionShape = currShape; // Use the base shape directly as collision object (Sphere, Box, Trimesh)

It works in release mode too.

You were right Aardvajk. Ive just tried it with /RTCsu and Optimization Disable and it lloks like the /RTCsu helped, so it an init problem. Many thanks!

This topic is closed to new replies.

Advertisement