NPC
This commit is contained in:
@@ -19,8 +19,12 @@ public class NPCimproved : MonoBehaviour
|
||||
{
|
||||
if (walking)
|
||||
{
|
||||
npcPrefab.transform.position += new Vector3(00,0,0.005f);
|
||||
//npcPrefab.transform.position += new Vector3(0,0,0.005f);
|
||||
npcPrefab.transform.position += transform.forward * Time.deltaTime;
|
||||
}
|
||||
|
||||
//animator.SetBool("IsTurning", false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -34,10 +38,12 @@ public class NPCimproved : MonoBehaviour
|
||||
animator.runtimeAnimatorController = Resources.Load("m_Controller") as RuntimeAnimatorController;
|
||||
walking = false;
|
||||
}
|
||||
}
|
||||
if (col.gameObject.tag == "Wall")
|
||||
{
|
||||
|
||||
npcPrefab.transform.eulerAngles += new Vector3(0,180,0);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user