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?
1 Answer
\$\begingroup\$
\$\endgroup\$
It sounds like you want standard collision detection, but a custom collision response. Sensors (Fixtures subsection 6.3) provide that functionality.
- Disable the default collision (use static bodies, filtering, etc.)
- Attach a sensor and implement a custom collision response