Hi all,
I will try and make myself clear:
I have multiple enemy zombies walking around, I have added a Raycast so that if the zombie hits any object or other zombies they will move in a different direction.
If my cargoes within a certain distance to the zombie, the zombie will turn and walk towards my car. If I hit the zombie with my car the zombie quickly turns into a ragdoll thus giving the impression its just been hit.
My problem is that if my car is not moving, the zombies all walk towards it looking for the “target” that is in the center of my car, so as soon as the zombie touches the box collider it thinks its been hit and turns into a ragdoll.
I have tried setting it so that when the zombie is near the target but not quit hitting the car then stop. But this doesn’t work because if a zombie walks from the side they are different distances. I have no idea how to make the zombie stop before hitting the collider to turn it into a ragdoll.
I basically want the zombie to walk to the car… stop just before the box collider and attack.
I have tried another box collider, I tried using a raycast, but it just keeps moving towards the centre.
Thanks for any help