- Home /
on trigger in top down shooter
question about triggers and rigidbodies.
in my top down shooter, I want my bullets to collide with walls.
what works: - have a cube, give it a box collider, trigger on - have a bullet, give it a collider and rigidbody - inside cube script, ontrigger destroy(other.gameobject)
however this means all bullets will need to have rigidbodies. i'm guessing that performence wise it would be better to only have the wall with a rigidbody and the rest just colliders.
the problem: the ontrigger on the cube (after switching around which of the 2 has a rigidbody) will only destroy the bullets when the wall is moving, when standing still it will never register the ontrigger from the bullet
final question: does anyone know how to get the ontrigger to work, whitout having each bullet having its own rigidbody?
I guess that the only way is to make an other object, one invisible collider as trigger in front of walls. To save performance with rigidbody, mark them as $$anonymous$$inematic.
Your answer
Follow this Question
Related Questions
How do you make a movement and mouse look for a top down shooter? 0 Answers
topdown shooter unity 2 Answers
Camera Setup for Top Down Shooters 3 Answers
Orthographic TopDown game Shooting Direction 1 Answer
Writing weapon imprecision 1 Answer