Sensors detecting immovable bodies

Topics: Developer Forum
Jun 18, 2013 at 2:56 AM
Hello everyone. I have been working off and on with Farseer the last 18 months, and I came into an issue I am not sure how to solve.

The game situation:
I have a rock, and I want my wizard to summon lava beneath it. The lava is a sensor, and correctly detects when the wizard (Dynamic) moves on it, and hurts the wizard. The lava does not detect the rock and does not hurt the rock. I do not want the rock to be movable if the wizard tries to run into it.

I read old posts on here that sensors can not detect collisions of static bodies. Genbox (years ago) mentioned that you could have a dynamic body and set CollisionResponseEnabled to false. That property does not seem to exist in the version I am using (3.3.1). I was wondering if anyone had any advice how to go about this problem. I am creating a sensor and I want it to pick up on immovable bodies. All I need in this case is for it to fire the BeginContact from World.ContactManager.BeginContact.

Is there an alternate form of CollisionResponseEnabled that I just don't know about? With things like wind and magic and other outside sources of force, this object may get things running into it, or me calling ApplyForce on its body, but I do not want it to move. The same effect it would have with a static body, but with the collision detecting on sensors.