Hi I have a bomb that when explodes creates an explosion trigger object that deals damage to the player if they collide or trigger with the object.
I have tried using OnTriggerStay and OnCollisionStay but I have found a problem with these: when the explosion is created at the same point as my character is at and my character is not moving the Collider or Trigger does not take effect. However if my player moves into the trigger or moves within it. Than the trigger takes effect.
How can I fix this?
asked Nov 08 '10 at 11:16 PM
Don't depend on collision. Use a raycast or if using a sphere, the distance (squared if you really want to be efficient), and determine if your player is within the collider.
answered Nov 08 '10 at 11:52 PM