Good evening, I’m using the physics engine of cocos2d-x to detect che body collision. unfortunately I can not solve a problem. if two bodies collide the dynamic body goes in motion. I would like to detect the collision,but the two bodies must remain motionless.
I have already tried the following ways:
-
simulate a collision between two static bodies, but the collision is not detect
-
soon recognized the collision between two bodies, the dynamic is destroyed in the process of collision and rebuilt in the post collision. This method works but is poorly efficient, with two bodies at the same time the frame rate drops from 60 to 30 fps
-
i disable the dynamic body in the collision phase end enable in the post collision. but is useless.
there is no easy way to disable the effects of a collision on a body? I hope in your response, it is really important, I lost two days behind this problem and still do not know how to do.