super powerful engine

This commit is contained in:
maxwes08
2026-01-13 10:55:18 +01:00
parent 6249499be2
commit c2bd50511e
5 changed files with 39 additions and 20 deletions

View File

@@ -9,7 +9,7 @@ namespace Car_simulation
public float Speed => WheelSystem.CarSpeed;
public float Mass { get; set; } = 1500f; // kg
public float Mass { get; set; } = 2000f; // kg
public int WheelCount = 4;
public int DrivenWheels = 2;
@@ -90,7 +90,7 @@ namespace Car_simulation
}
}
public void Update(float deltaTime)
public void Update(float deltaTime, float totalTime)
{
Engine.Throttle = ThrottleInput;
Drivetrain.ClutchEngagement = 1f - ClutchInput;
@@ -99,7 +99,7 @@ namespace Car_simulation
Drivetrain.ClutchEngagement = 0f;
// Update engine
Engine.Update(deltaTime);
Engine.Update(deltaTime, totalTime);
// Update drivetrain (transfers energy between engine and wheels+car)
Drivetrain.Update(deltaTime);