Objects not colliding (not contact callback called) :(.

HexDump

29-12-2007 16:46:52

Hi all,

I have read a lot of the topics in the forum. I have followed the examples but can´t make contact callback work.

I have setup a material, a pair and a callback to be called, but bodies in contanct just are not calling my callback.

I have made my wolrd the correct size and one object is stand still but the other is moving with SetStandardForceCallback();.

Do anybody know what could be hapenning? The only strange thing I see in my code is this m_pMatPairEntityEntity->(new OgreNewt::MaterialPair( m_pPhysicWorld, m_pEntityMaterial, m_pEntityMaterial ), that is a simple pair for collisions between entities (both with same material).

Thanks in advance, Help would be greatly apreciated,
HexDUmp.

walaber

29-12-2007 19:13:55

hard to say without seeing your code...

a common mistake is to forget to actually set the proper material to the bodies in the simulation, you haven't forgotten that, right?

HexDump

29-12-2007 20:02:04

well walaber I fix it.

The problem was that for the size I was passing 0 in one of the axis (I wanted to collide with a plane, and after calculating the size of it, one axis is 0 ). Anywy the collision mesh was shown (in debugging mode), though its height was 0. What I have done is just set a 0 size to a 0.001 defaut size.

By the way walaber a little question. I have a plane and a box colliding, I have set up a default gravity force. The plane is static (mass=0), and the box is falling downwards. When the box make a contact with the plane, it bounces, and then continues falling, passing through the plane :/. What could be the problem with this? I have used continuous collision with same result.

Thanks for your time,
HexDump.