Hi all,
I’ve been trying for a good few hours now to get this working but can’t find anything online or figure it out myself.
I have a model zombie that moves towards my car, when it collides with my car it stops and I play an animation to attack. If my car moves, the zombie will then move to wherever I go. If my car hits the zombie it will change the model to a ragdoll of the zombie so it falls.
I have my zombie setup with a box collider that has ‘isTrigger’ ticked (So it knows if its hit the car)
To move my zombie I give it a target to find:
GameObject go = GameObject.FindGameObjectWithTag("Target");
I then use this code to move the zombie forward and play my walk animation:
//Move towards target
myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime;
My problem is that when I duplicate my zombie, they all walk through each other, I tried adding another box collider to them both, I’ve tried adding a rigidbody… nothing seems to work.
Please help!
Thank you