Enemies are Trigger Objects as they need to be destroyed on collision with Bullet(GameObject) so they don’t have RigidBody. If I put rigidbodies in enemies, they’d pass through the ground. Please Help !!! Thanx in advance!!!
Hi,
About the movement, you want your enemies to 1. move towards you and 2. look at you. Then you should use thse functions:
- Vector3.MoveTowards (Unity - Scripting API: Vector3.MoveTowards)
- Transform.LookAt (Unity - Scripting API: Transform.LookAt)
Try to use these ones and if you ever have problems to do so, we’ll be happy to help you debug your script ![]()
About the rigidbody. I think you need one here. Do your enemies use gravity ? If it’s not the case, you can disable it. Are you positive your ground has a collider ? Convex collider can be a solution too.
Cheers