- Home /
A bigggggggggg problem about collision !!
Hi guys, today I was creating my first fps, when something strange happened: when I shoot a projectile from my gun, it should collide with the terrain and with the environment, but it did not: I've already putted the rigid bodies, the collider and the functions. HAVE YOU THE SOLUTION????
Is it not moving to fast? And do you have scripts? If so, what?
Answer by flaviusxvii · Apr 27, 2011 at 10:39 PM
A velocity of 300 is likely causing missed collisions. You'll need to set things to use continuous collision detection or do the raycasting yourself.
http://www.unifycommunity.com/wiki/index.php?title=DontGoThroughThings
Answer by lalo1998 · Apr 27, 2011 at 10:19 PM
There Is an option in the collider function that has an option that says "is trigger". If you put a checkmark on it then the bullet will go through any object that doesn't have that function.
I suggest that you put the "is trigger" function on whatever object you want to make your bullet collide with so that if you shoot a lot of bullets they won't add up. Or just add a script that will destroy the object after it is created
Answer by RolfBertram-com · Apr 27, 2011 at 11:46 PM
Reduce speed, reduce mass. Use box colliders instead of mesh colliders.