Skip to content

Commit

Permalink
fix: wheel flicker
Browse files Browse the repository at this point in the history
Signed-off-by: Alptuğ Cırıt <[email protected]>
  • Loading branch information
mozhoku committed Oct 3, 2024
1 parent 4f9bbbb commit 892e80d
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,6 @@ private void Start()
// Set initial vehicle gear to Park to prevent movement
_vehicleController.data.bus[Channel.Input][InputData.AutomaticGear] = (int)Gearbox.AutomaticGear.P;

// reset vpp stuff for multi-scene loading (no idea why, but it works)
_vehicleController.enabled = false;
_vehicleController.enabled = true;

// Subscribe to events
_egoVehiclePositionManager = FindObjectOfType<EgoVehiclePositionManager>();
if (_egoVehiclePositionManager != null)
Expand Down Expand Up @@ -268,10 +264,8 @@ public void HandleSteer()

private void SetWheelSteerAngleDirectly(float angle)
{
foreach (var wheel in _frontWheels)
{
wheel.steerAngle = angle;
}
_vehicleController.wheelState[1].steerAngle = angle;
_vehicleController.wheelState[0].steerAngle = angle;
}

// temp method to simulate steering wheel input with delay, also inaccurate (mozzz)
Expand Down

0 comments on commit 892e80d

Please sign in to comment.