- Home /
collide with everything except for me
I made an ice plate that have a collision with everything. When something touch it - it disappear (breaks) in 0.5 seconds.
The problem is that when my "helper" (character that helps in the game), an enemy or even bullets touch it - it desappear BUT when I touch it (the main character) nothing happen!
How I make the ice disappear when everyting, including me, touch it?
here is my code if something wrong there:
function OnCollisionEnter ()
{
Destroy(gameObject, 0.5);
}
(thats all the code)
Sorry for poor english :)
Answer by lil_billy · May 14, 2011 at 04:48 PM
because its ice try OnCollisionStay
so im not good with debug logs i just use print statements
try putting this in the function parameter (collision : Collision) and above destroy put this: print(collision);
then check the error box at the bottom run your character into the sucker and see if it actually recognizes the players collider if not try attaching a freaking cube to the players feet as a child give it a collider and a script that has it ignore all colliders so it ignores all collisions but everything else wont ignore it
There is no collision with the character!!! now I will try to attach the cube...
Even if it attached as a child don't works!!! There-Is-No-Collision-With-The-Character!!!!!
$$anonymous$$aybe it because of the CharacterController? It the only thing that have this and don't have any mesh colliders. so might be that the problem? It not like I go through the ice, it just nothing happen when I walk on it, it like another thing to walk on...
Your answer
Follow this Question
Related Questions
2 objects collide, need to destroy one 2 Answers
Have bullets be destroyed when they collide with ANY collider 0 Answers
Help with collisions and destroy please 1 Answer
Colliders Events 1 Answer