Collision sensor not working!

Hi! I have a character physics object with actor activatedn and sphere collision bounds aswell as a sensor object that is invisible, detect actors and has got convex hull collision bounds. However, collision sensor that detects the sensor object doesn’t work for character. Also changing the sensor to static ghost doesn’t work… What to do?

Collision sensors cannot detect objects with the Sensor physics type. You can place a Collision sensor your sensor object, and it will detect your character. Alternatively, you can just replace the sensor object with a static one that has Ghost enabled.

Hey adriansnetlis,

I too, use something similar to what Mobious described. For example an ammo pickup:

Visual object of ammo - No collision
Collision box around the ammo pickup - Static, Ghost, invisible

Well, I have a problem- I said so it doesn’t work on static ghost too…

Double check your objects’ collision bounds and make sure they are actually colliding when you expect them to. You can enable “Physics Visualization” under Render -> Display to help with this. If you still can figure it out, post a simplified .blend file demonstrating the issue.

Here is .blend
Property 1 on player should become 1 when it goes into water, but it doesn’t… Why?
Water collider is cube under water plane. lay around it’s physics to tell if you can get it work…

Attachments

Wipeout.blend (826 KB)

I said post a simplified .blend for a reason…

If you’re referring to the collision between the player and the water, the collision sensor is working perfectly fine. If you think it’s not working because the “water” property stays 0, that’s because the collision sensor activates both the “damp” and “undamp” actuators on the same frame. “undamp” is lower and therefore executed after the “damp” actuator, causing the “water” property to immediately go back to 0.

But why? It has collision with water so it had to do only and and not the nand…

Your exit condition is also an AND. Change it to a NAND to have it trigger when you stop touching water.
Your water object is also too low. Raise it up so that the player can continue to collide with it.

OK! Thanks, now it is resolved;)

Just to add to agoose’s explanation: the player would only collide with the water for a single frame when it had sufficient downward velocity. The solid plane object that was positioned right on top of the water would immediately stop the player from colliding on the following frame. Moving the water up (or the plane down) fixes this.