How to prevent collision between connected bodies in Box2D ?

By | March 11, 2011

Hi,

While using Box2D , in many cases you may need to connect two bodies together. But the collision between them during motion is not what you preferred! So how can you prevent those bodies being connected in Box2D from collision?
Use the line of code to prevent the collision.

jointDef.collideConnected = false;

Leave a Reply

Your email address will not be published. Required fields are marked *