- Home /
Collision-detection ALWAYS happens
I have a laser bolt prefab with a Rigidbody and a box collider, and a character with the same. I've set the size of the laser's box collider to .001, .001, .001, but as soon as I press fire it collides such that I don't even see the bolt. If I turn on isTrigger I see the bolt and it enters OnTriggerEnter, but then I don't get access to the ContactPoint, which I need in order to produce a particle system aligned to the normals of the collided object.
But again, I would like to solve the collision-always-happens issue first. Thanks in advance.
EDIT: I should add that the level itself is a multi-part model, each part with mesh collision. So I don't know with what the laser is colliding when it collides so fast that I don't see it.
Answer by Statement · Dec 19, 2010 at 06:50 AM
It sounds like you're spawning the bolt onto the character, so there is a collision between the character and the bolt on spawn. I think this is a common error beginners make. Try spawning it outside the character or set up collision layers so they ignore each other.
By the way, having such small colliders (1 mm^3) probably isn't practical. You are likely to get all sorts of tunneling effects if you want to use movement on them unless you perform your own ray/sphere/capsule casts.