Objects sometimes do not collide

Novas
Posts: 2
Joined: Mon Jan 05, 2009 2:13 pm

Objects sometimes do not collide

Post by Novas »

Hi everybody!
I have a strange Problem with my GameEngine (using BulletPhysics):
sometimes my objects just act as if there was no other object at all. this means: they do not crash into each other but one flies through the other. or sometimes one object gets stuck into the other one. but this only happens sometimes.

i tested this by having a stone (cylinder) falling towards a board. sometimes the stone falls onto the board and then stays there. sometimes it acts as if it was not there and keeps falling. sometimes the stone falls through the upper part of the board but doesn't fall out of the lower part so that it stays inside of that object.

do you have any idea how that could happen? or better: how i can get rid of that strange behaviour?
thanks for reading ;)
JohnnyM
Posts: 15
Joined: Tue Dec 23, 2008 11:51 pm

Re: Objects sometimes do not collide

Post by JohnnyM »

Use setCcdMotionThreshold for the rigid bodies and set the threshold to the shortest width of the object. Not sure about your getting stuck problem, but this should at least stop the objects from passing through each other.