Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Basically I "think" I want a static body that does not have any density so another body can "pass through it" without getting slowed down. I tried this and it doesn't seem to work. What would be the proper way to do this?

Any version (C,C++, Java) would be fine for an answer.

share|improve this question
Why make it a Box2D body at all if you don't want it to interact with other bodies? Or is there just one specific body you want to be able to pass through this body? – Byte56 Feb 4 '13 at 18:26
Why don't you just use collision groups? – Grey Feb 4 '13 at 18:30
+Byte46 I was making it a body because I am going to try to use it as the boundaries for a cellular automate (?) based of the location of the body (think body has sub bodies) also it helped with debug rendering. I could remove it as a body but that isn't the question I asked. – Jackie Feb 4 '13 at 19:20
Use sensors, instead of body – noob Feb 9 '13 at 15:48
up vote 2 down vote accepted

A collision filter is probably what you are looking for, since Box2D makes all objects collide by default.

Take a look at this tutorial:

share|improve this answer
the link is not working..... – seenu Jul 15 '14 at 7:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.