Make everything collide in static mode

Hi,

My game is near to complete.

The problem now is that everything collide but the objects are thrown far. I want that collision event happen but the objects don’t move or affected by collision, only generate collision event.

Im using Cocos2d-X v3 rc0 and it new Physic system.

Can anyone help me?

Ty.

Please. Anyone have any opinion?

Here is the interesting page: http://www.cocos2d-x.org/docs/manual/framework/native/physics/physics-integration/en

and this content:

There are four contact callback functions in EventListenerPhysicsContact: onContactBegin, onContactPreSolve, onContactPostSolve and onContactSeperate.

onContactBegin will be invoked at contact begin, and only invoke once at this contact. You can decide two shapes have collision or not by return true or false. you can use PhysicsContact::setData() to set user data for coming contact operation. Be noticed, onContactPreSolve and onContactPostSolve will not be invoked when onContactBegin return false, but however onContactSeperate will be invoked once.

onContactPreSolve will be invoked at each step, you can use PhysicsContactPreSolve setting functions to set contact parameters, like restitution, friction and etc. You can also decide two shapes have collision or not by return true or false, and you can invoke PhysicsContactPreSolve::ignore() to skip subsequent onContactPreSolve and onContactPostSolve callbacks(return true in default).

@Ajas Be noticed, onContactPreSolve and onContactPostSolve will not be invoked when onContactBegin return false, but however onContactSeperate will be invoked once.

What about if I want my physics bodies to pass each other but only have collisions when I press a button?

Thanks!