Skip to content

Commit

Permalink
🐛 fix(towing): Revert steer angle calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
esnya committed Jun 7, 2022
1 parent 14b6247 commit aa9149c
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@ private void FixedUpdate()

if (connectedWheelColliders != null)
{
var connectedForward = connectedRigidbody.transform.forward;
var jointAngle = Vector3.SignedAngle(connectedForward, acceleration.normalized, Vector3.up);
var steerAngle = Mathf.Lerp(jointAngle, 0, acceleration.magnitude);
var steerAngle = Vector3.SignedAngle(connectedTransform.forward, transform.forward, Vector3.up);
foreach (var wheel in connectedWheelColliders)
{
wheel.steerAngle = steerAngle;
Expand Down

0 comments on commit aa9149c

Please sign in to comment.