Skip to content

Commit

Permalink
Steer damping fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adrenak committed Jul 8, 2019
1 parent dcc9d40 commit 24443a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Assets/Adrenak/Tork/AI/Demo/AIDemo.unity
Original file line number Diff line number Diff line change
Expand Up @@ -2343,7 +2343,7 @@ Transform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1424718895}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 22.45, y: 1.6846727, z: 16.56}
m_LocalPosition: {x: 76.4, y: 1.1, z: 131.2}
m_LocalScale: {x: 2.254064, y: 2.2540638, z: 2.2540638}
m_Children: []
m_Father: {fileID: 0}
Expand Down
6 changes: 3 additions & 3 deletions Assets/Adrenak/Tork/AI/Scripts/AIPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public override VehicleInput GetInput() {
lastSteer = p_Input.steering;
newSteer = Mathf.Clamp(angle / m_Steering.range, -1, 1);
damping = (newSteer - lastSteer) * steerDamping;
p_Input.steering = newSteer - damping;
p_Input.steering = newSteer + damping;

if (isBehind && isInCircle)
m_Direction = Direction.Reverse;
break;
Expand All @@ -78,7 +78,7 @@ public override VehicleInput GetInput() {
lastSteer = p_Input.steering;
newSteer = Mathf.Clamp(angle / m_Steering.range, -1, 1);
damping = (newSteer - lastSteer) * steerDamping;
p_Input.steering = newSteer - damping;
p_Input.steering = newSteer + damping;

if (!isBehind && !isInCircle)
m_Direction = Direction.Forward;
Expand Down
1 change: 1 addition & 0 deletions Assets/Adrenak/Tork/Common/Prefabs/Tocus.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -2717,6 +2717,7 @@ MonoBehaviour:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 0
m_Player: {fileID: 0}
--- !u!114 &114500219053648900
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down

0 comments on commit 24443a0

Please sign in to comment.