One Way Kinetics: Arrows etc.

Hello dear people,


In our project we give the player the possibility to move a physical object that should act as if everything else is a static body - even if they are actually dynamic. The player is absolutely not allowed to influence the world using this interface tool.

Is there a way to make sure the interface object collides correctly with other bodies, but the other bodies are not influenced whatsoever?

To sound like confusing: the same principle counts for arrows. An arrow should never push another object around, but it can't be a sensor either - because the sensor would be inside the object when it hits, and a normal dynamic body would be placed exactly at the collision point.


Thanks a lot!

Antoon
I think you can filter the shapes (of fixtures) related to the body. So, even if you have a body, it will not create physical response in the engine. I used it in my games to create a "hand" from which to grab or move objects creating joints to this body.

Hope it helps...
BTW, I made this in an old version of Box2D, not the latest, so maybe this can change a bit, as I didn't have time to learn new API. Nevertheless I think this "masking" concept is used in next version.

Original thread: https://box2d.org/forum/viewtopic.php?t=4728