Merge branch 'master' of ooftooft.net:Racesm
# Conflicts: # Assets/ML-Agents/Timers/Car Customization_timers.json # Assets/ML-Agents/Timers/Racetrack mini_timers.json
This commit is contained in:
@@ -10,17 +10,13 @@ public class NPCimproved : MonoBehaviour
|
||||
private bool walking = true;
|
||||
|
||||
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (walking)
|
||||
{
|
||||
//npcPrefab.transform.position += new Vector3(0,0,0.005f);
|
||||
npcPrefab.transform.position += transform.forward * Time.deltaTime;
|
||||
npcPrefab.transform.position = new Vector3(npcPrefab.transform.position.x, 0, npcPrefab.transform.position.z);
|
||||
}
|
||||
|
||||
//animator.SetBool("IsTurning", false);
|
||||
@@ -42,7 +38,7 @@ public class NPCimproved : MonoBehaviour
|
||||
if (col.gameObject.tag == "Wall")
|
||||
{
|
||||
|
||||
npcPrefab.transform.eulerAngles += new Vector3(0,180,0);
|
||||
npcPrefab.transform.eulerAngles += new Vector3(0,120,0);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,18 +77,19 @@ public class PlayerController : MonoBehaviour
|
||||
|
||||
if (isBraking)
|
||||
{
|
||||
wheel.WheelCollider.motorTorque = 0;
|
||||
wheel.WheelCollider.brakeTorque = Mathf.Abs(vInput) * brakeTorque;
|
||||
//wheel.WheelCollider.motorTorque = 0;
|
||||
}
|
||||
|
||||
if (isAccelerating)
|
||||
{
|
||||
// Apply torque to Wheel colliders that have "Motorized" enabled
|
||||
wheel.WheelCollider.brakeTorque = 0;
|
||||
if (wheel.motorized)
|
||||
{
|
||||
wheel.WheelCollider.motorTorque = vInput * currentMotorTorque;
|
||||
}
|
||||
wheel.WheelCollider.brakeTorque = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user