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);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class carcontrolv2 : MonoBehaviour
|
||||
|
||||
public float autoBrake;
|
||||
|
||||
public GameObject lookat;
|
||||
//public GameObject lookat;
|
||||
public AudioSource audio;
|
||||
|
||||
WheelControl[] wheels;
|
||||
@@ -118,7 +118,7 @@ public class carcontrolv2 : MonoBehaviour
|
||||
}
|
||||
|
||||
|
||||
lookat.transform.localPosition = new Vector3 (THINP*1.5f,1,4);
|
||||
//lookat.transform.localPosition = new Vector3 (THINP*1.5f,1,4);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user