Bullet collision for space shooter - colliders, rays, etc?

Hello all,

I’m in the process of making a space shooter and need some advice on what to use to detect the collision between the player’s bullets and the enemies. I know that rays are commonly used for faster moving projectiles in first person shooters, but would would be the best method for slower moving bullets - triggers, rigidbodies, etc??? I do want the collisions to be as accurate as possible too.

Any code to help get me started would also be fantastic :slight_smile:

Just add rigidbody and them use OnCollisionEnter

You should use triggers and colliders (normal size). For the bullets rigidbody, turn collision detection to “Continuous dynamic”. For the targets rigidbodies set collision detection to “Continuous”. Using these settings will lead to longer physics calculations that is more precise with fast moving bullets. Take the good with the bad.

Source: