- Home /
Problem with Mesh Collider Collisions
Hey there, i am new in unity and i have a problem.
i modeled my level in cinema 4d and added a mesh collider on it, so that my character can walk on it. it works nicely. i also added the ability to shoot laser to my character, this also works nice,
so when i add a cube in unity and use this script:
function OnCollisionStay(col : Collision){
print (col.gameObject.tag);
if (col.gameObject.tag == "laser"){
Destroy(gameObject);
Destroy(col.gameObject);
}
}
the cube gets destroyed and the laser"bullet".
but when i try this one on my mesh collider:
function OnCollisionStay(col : Collision){
if (col.gameObject.tag=="laser") {
Destroy(col.gameObject);
}
}
it doesnt work. the laser bullet just "flys" through the collider. i dont understand why. i move the bullet with AddForce (just for information).
hopefully you can help, and sorry for my bad english (i am from austria)
Your answer
Follow this Question
Related Questions
Imported Objects not solid (Mesh Collider) 2 Answers
Colliding with a moving object 1 Answer
My character jumps occationally when against a wall? 2 Answers
Mesh Collider collision problem 0 Answers
Character Collision Issue 1 Answer