Jim the Hermit
Member
I got a zombie model and made a new character with the AI agent set. I tried using an animator I made but all the NPC does is the walking animations without going anywhere. It also can die when shot.
Is there a night school I can go to learn how to modify it?You can use the same animator as your player controlled characters use - from the AI's perspective this aspect does not change.
Have you gone through the documentation and example video that Justin has created, I found these really helpful when creating a new animator controller. I prefer to build one from scratch as there is a lot going on in the demo controller.
private void GoWalk()
{
anim.SetInteger("AbilityIndex", 6);
anim.SetInteger("AbilityIntData", 0);
anim.SetTrigger("AbilityChange");
}
private void FaceTarget()
{
Vector3 direction = (target.position - transform.position).normalized;
Quaternion lookRotation = Quaternion.LookRotation(new Vector3(direction.x, 0, direction.z));
transform.rotation = Quaternion.Slerp(transform.rotation, lookRotation, Time.deltaTime * turnSpeed);
}