add races

This commit is contained in:
Valera 2025-11-19 17:38:09 +07:00
parent bbc479be33
commit 9d92c4ca93
3 changed files with 2 additions and 9 deletions

View File

@ -246,7 +246,6 @@ public class Transmission : PowertrainComponent
[Property] public bool AllowDownshiftGearSkipping { get; set; } = true; [Property] public bool AllowDownshiftGearSkipping { get; set; } = true;
private bool _repeatInputFlag; private bool _repeatInputFlag;
private float _smoothedThrottleInput;
/// <summary> /// <summary>
/// Timer needed to prevent manual transmission from slipping out of gear too soon when hold in gear is enabled, /// Timer needed to prevent manual transmission from slipping out of gear too soon when hold in gear is enabled,

View File

@ -14,7 +14,6 @@ public partial class VeloXWheel : Component
[Property, Group( "Suspension" )] public float SpringStiffness { get; set; } = 20000.0f; [Property, Group( "Suspension" )] public float SpringStiffness { get; set; } = 20000.0f;
[Property, Group( "Suspension" )] float ReboundStiffness { get; set; } = 2200; [Property, Group( "Suspension" )] float ReboundStiffness { get; set; } = 2200;
[Property, Group( "Suspension" )] float CompressionStiffness { get; set; } = 2400; [Property, Group( "Suspension" )] float CompressionStiffness { get; set; } = 2400;
[Property, Group( "Suspension" )] float BumpStopStiffness { get; set; } = 5000;
[Property, Group( "Traction" )] public TirePreset Tire { get; set; } = ResourceLibrary.Get<TirePreset>( "frictions/default.tire" ); [Property, Group( "Traction" )] public TirePreset Tire { get; set; } = ResourceLibrary.Get<TirePreset>( "frictions/default.tire" );
[Property, Group( "Traction" )] public float SurfaceGrip { get; set; } = 1f; [Property, Group( "Traction" )] public float SurfaceGrip { get; set; } = 1f;
@ -128,7 +127,6 @@ public partial class VeloXWheel : Component
} }
const string playerTag = "player";
private bool TraceWheel( VeloXBase vehicle, ref WheelTraceData wheelTraceData, Vector3 start, Vector3 end, float width, in float dt ) private bool TraceWheel( VeloXBase vehicle, ref WheelTraceData wheelTraceData, Vector3 start, Vector3 end, float width, in float dt )
{ {
@ -139,7 +137,7 @@ public partial class VeloXWheel : Component
.Rotated( vehicle.WorldRotation * CylinderOffset ) .Rotated( vehicle.WorldRotation * CylinderOffset )
.UseHitPosition( false ) .UseHitPosition( false )
.IgnoreGameObjectHierarchy( Vehicle.GameObject ) .IgnoreGameObjectHierarchy( Vehicle.GameObject )
.WithoutTags( playerTag ) .WithCollisionRules( Vehicle.GameObject.Tags )
.Run(); .Run();
//DebugOverlay.Trace( trace, overlay: true ); //DebugOverlay.Trace( trace, overlay: true );
@ -160,10 +158,6 @@ public partial class VeloXWheel : Component
float FzPoint = springForce + damperForce; float FzPoint = springForce + damperForce;
// Bump stop
float minCompression = -0.05f;
if ( compression <= minCompression ) FzPoint += (minCompression - compression) * BumpStopStiffness;
wheelTraceData.ContactNormal += contactNormal; wheelTraceData.ContactNormal += contactNormal;
wheelTraceData.ContactPosition += contactPos; wheelTraceData.ContactPosition += contactPos;
wheelTraceData.Compression += compression; wheelTraceData.Compression += compression;

View File

@ -6,6 +6,6 @@ public class TestInit
[AssemblyInitialize] [AssemblyInitialize]
public static void ClassInitialize( TestContext context ) public static void ClassInitialize( TestContext context )
{ {
Sandbox.Application.InitUnitTest(); Sandbox.Application.InitUnitTest<TestInit>( false, false );
} }
} }