0
\$\begingroup\$

I want to use box2D to create a movement system for an RTS game. How can I make bodies block the movement of other bodies while preventing these bodies from pushing each other?

\$\endgroup\$
1
  • \$\begingroup\$ Have you tried increasing friction and/or changing the mass of the bodies you don't want to be "pushed"? \$\endgroup\$ Commented Dec 28, 2013 at 20:18

1 Answer 1

1
\$\begingroup\$

It sounds like you want standard collision detection, but a custom collision response. Sensors (Fixtures subsection 6.3) provide that functionality.

  1. Disable the default collision (use static bodies, filtering, etc.)
  2. Attach a sensor and implement a custom collision response
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .