This commit is contained in:
2025-11-18 21:53:51 +07:00
parent 97fcb29bc0
commit bbc479be33
11 changed files with 152 additions and 42 deletions

View File

@@ -34,7 +34,7 @@ public partial class VeloXWheel
/// </summary>
public float CounterTorque { get; private set; }
[Property, Range( 0, 2 )] public float BrakeMult { get; set; } = 1f;
//[Property, Range( 0, 2 )] public float BrakeMult { get; set; } = 1f;
public Friction ForwardFriction = new();
public Friction SidewayFriction = new();
public Vector3 FrictionForce;
@@ -100,7 +100,7 @@ public partial class VeloXWheel
private void UpdateFriction( float dt )
{
var motorTorque = DriveTorque;
var brakeTorque = BrakeTorque * BrakeMult;
var brakeTorque = BrakeTorque;
float allWheelLoadSum = Vehicle.CombinedLoad;

View File

@@ -16,7 +16,7 @@ internal sealed class WheelManager : GameObjectSystem
private void UpdateWheels()
{
if ( !Game.IsPlaying )
if ( !Game.IsPlaying || Scene.IsEditor )
return;
//Stopwatch sw = Stopwatch.StartNew();
@@ -38,7 +38,7 @@ internal sealed class WheelManager : GameObjectSystem
}
private void UpdateEngine()
{
if ( !Game.IsPlaying )
if ( !Game.IsPlaying || Scene.IsEditor )
return;
//Stopwatch sw = Stopwatch.StartNew();