Merge branch 'SmallVehicleImprovements' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-SmallVehicleImprovements

# Conflicts:
#	Source/Engine/Physics/Actors/WheeledVehicle.h
This commit is contained in:
Wojtek Figat
2025-09-22 16:18:12 +02:00
2 changed files with 57 additions and 9 deletions

View File

@@ -468,10 +468,18 @@ public:
API_FIELD(Attributes="EditorOrder(1), EditorDisplay(\"Vehicle\")")
bool UseAnalogSteering = false;
#if USE_EDITOR
/// <summary>
/// If checked, will draw wheel names and indices at the position of their colliders.
/// </summary>
API_FIELD(Attributes="EditorOrder(2), EditorDisplay(\"Vehicle\")")
bool ShowDebugDrawWheelNames = false;
#endif
/// <summary>
/// Gets the vehicle driving model type.
/// </summary>
API_PROPERTY(Attributes="EditorOrder(2), EditorDisplay(\"Vehicle\")") DriveTypes GetDriveType() const;
API_PROPERTY(Attributes="EditorOrder(4), EditorDisplay(\"Vehicle\")") DriveTypes GetDriveType() const;
/// <summary>
/// Sets the vehicle driving model type.
@@ -481,12 +489,12 @@ public:
/// <summary>
/// Gets the vehicle wheels settings.
/// </summary>
API_PROPERTY(Attributes="EditorOrder(4), EditorDisplay(\"Vehicle\")") const Array<Wheel>& GetWheels() const;
API_PROPERTY(Attributes="EditorOrder(5), EditorDisplay(\"Vehicle\")") const Array<Wheel>& GetWheels() const;
/// <summary>
/// Gets the vehicle drive control settings.
/// </summary>
API_PROPERTY(Attributes="EditorOrder(5), EditorDisplay(\"Vehicle\")") DriveControlSettings GetDriveControl() const;
API_PROPERTY(Attributes="EditorOrder(6), EditorDisplay(\"Vehicle\")") DriveControlSettings GetDriveControl() const;
/// <summary>
/// Sets the vehicle drive control settings.
@@ -501,7 +509,7 @@ public:
/// <summary>
/// Gets the vehicle engine settings.
/// </summary>
API_PROPERTY(Attributes="EditorOrder(6), EditorDisplay(\"Vehicle\")") EngineSettings GetEngine() const;
API_PROPERTY(Attributes="EditorOrder(7), EditorDisplay(\"Vehicle\")") EngineSettings GetEngine() const;
/// <summary>
/// Sets the vehicle engine settings.
@@ -511,7 +519,7 @@ public:
/// <summary>
/// Gets the vehicle differential settings.
/// </summary>
API_PROPERTY(Attributes="EditorOrder(7), EditorDisplay(\"Vehicle\")") DifferentialSettings GetDifferential() const;
API_PROPERTY(Attributes="EditorOrder(8), EditorDisplay(\"Vehicle\")") DifferentialSettings GetDifferential() const;
/// <summary>
/// Sets the vehicle differential settings.
@@ -521,7 +529,7 @@ public:
/// <summary>
/// Gets the vehicle gearbox settings.
/// </summary>
API_PROPERTY(Attributes="EditorOrder(8), EditorDisplay(\"Vehicle\")") GearboxSettings GetGearbox() const;
API_PROPERTY(Attributes="EditorOrder(9), EditorDisplay(\"Vehicle\")") GearboxSettings GetGearbox() const;
/// <summary>
/// Sets the vehicle gearbox settings.
@@ -531,7 +539,7 @@ public:
// <summary>
/// Sets axles anti roll bars to increase vehicle stability.
/// </summary>
API_PROPERTY() void SetAntiRollBars(const Array<AntiRollBar>& value);
API_PROPERTY(Attributes="EditorOrder(10), EditorDisplay(\"Vehicle\")") void SetAntiRollBars(const Array<AntiRollBar>& value);
// <summary>
/// Gets axles anti roll bars.
@@ -557,18 +565,36 @@ public:
/// <param name="value">The value (-1,1 range).</param>
API_FUNCTION() void SetSteering(float value);
/// <summary>
/// Gets the vehicle steering. Steer is the analog steer value in range (-1,1) where -1 represents the steering wheel at left lock and +1 represents the steering wheel at right lock.
/// </summary>
/// <returns>The vehicle steering.</returns>
API_FUNCTION() float GetSteering();
/// <summary>
/// Sets the input for vehicle brakes. Brake is the analog brake pedal value in range (0,1) where 1 represents the pedal fully pressed and 0 represents the pedal in its rest state.
/// </summary>
/// <param name="value">The value (0,1 range).</param>
API_FUNCTION() void SetBrake(float value);
/// <summary>
/// Gets the vehicle brakes. Brake is the analog brake pedal value in range (0,1) where 1 represents the pedal fully pressed and 0 represents the pedal in its rest state.
/// </summary>
/// <returns>The vehicle brake.</returns>
API_FUNCTION() float GetBrake();
/// <summary>
/// Sets the input for vehicle handbrake. Handbrake is the analog handbrake value in range (0,1) where 1 represents the handbrake fully engaged and 0 represents the handbrake in its rest state.
/// </summary>
/// <param name="value">The value (0,1 range).</param>
API_FUNCTION() void SetHandbrake(float value);
/// <summary>
/// Gets the vehicle handbrake. Handbrake is the analog handbrake value in range (0,1) where 1 represents the handbrake fully engaged and 0 represents the handbrake in its rest state.
/// </summary>
/// <returns>The vehicle handbrake.</returns>
API_FUNCTION() float GetHandbrake();
/// <summary>
/// Sets the input for tank left track throttle. It is the analog accelerator pedal value in range (-1,1) where 1 represents the pedal fully pressed to move to forward, 0 to represents the
/// pedal in its rest state and -1 represents the pedal fully pressed to move to backward. The track direction will be inverted if the vehicle current gear is rear.