jjpp
jjpp

Reputation: 1328

How to avoid repulsion between two bodies in box2d

When I create two dynamic bodies in box2d(cocos2dx), they repels each other and start to move in opposite directions. Which property I have to set to avoid this.

Upvotes: 0

Views: 103

Answers (1)

iforce2d
iforce2d

Reputation: 8262

Don't create them on top of each other. It seems like you are not using the debug draw display to see what is really happening. I strongly recommend you use it.

Upvotes: 1

Related Questions