Sensor Collision?

EatMoreHippo

  • Posts: 62
How can I get sensor collision to work? I'm trying to have an "ice" actor, that is a sensor, apply a constant change to the behaviors of those on top of it but I can't seem to get it to actually constantly detect that there is collision between the two.

For now I'm using a region that detects if there's ice beneath but there's some bugs associated with this and it's not as good as basic collision with sensors (I'm assuming).

Blob

  • *
  • Posts: 721
The whole point of a sensor is that it's an actor bound that doesn't have a collision. An actor doesn't need to be a sensor to affect/change things it's colliding with, a standard collision bound should work in your case.

~ Blob

EatMoreHippo

  • Posts: 62
The whole point of a sensor is that it's an actor bound that doesn't have a collision. An actor doesn't need to be a sensor to affect/change things it's colliding with, a standard collision bound should work in your case.

~ Blob
I think I initially misunderstood you and wasn't clear.

Sensors still detect collision though and I want the actor (ice in this case) to affect the other actors while it's on top of it. The actor needs to be a sensor because I don't want it to have normal collision but rather produce a result that I control when other actors collide with it (to create a slippery controls effect in this case).

So the question is if the sensors do detect collision how can I call a block when the sensor collides with something?

« Last Edit: July 26, 2011, 12:34:05 am by EatMoreHippo »

Greg

  • *
  • Posts: 1259
Sensors still fire an event in the "when collided" block just like normal collision shapes.  The only difference is that they don't produce a physical response (i.e. push/bump things).

So you can check for collisions just like you do anything else.

dubealex

  • Posts: 26
I tried to make an actor sensor, and I could not use the normal "When the top was hit" type of block. It's like a sensor do register a collision event by not producing a response of an obstacle in-game, but it also seems we cnanot use the "sides" detection blocks with a sensor.

In one of my behavior, I had to manually check for the X and Y of the collided actor versus the current actor to determine its position based on the sensor actor.