add getter for steering
This commit is contained in:
@@ -200,6 +200,11 @@ void WheeledVehicle::SetSteering(float value)
|
|||||||
_steering = Math::Clamp(value, -1.0f, 1.0f);
|
_steering = Math::Clamp(value, -1.0f, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float WheeledVehicle::GetSteering()
|
||||||
|
{
|
||||||
|
return _steering;
|
||||||
|
}
|
||||||
|
|
||||||
void WheeledVehicle::SetBrake(float value)
|
void WheeledVehicle::SetBrake(float value)
|
||||||
{
|
{
|
||||||
value = Math::Saturate(value);
|
value = Math::Saturate(value);
|
||||||
|
|||||||
@@ -553,6 +553,12 @@ public:
|
|||||||
/// <param name="value">The value (-1,1 range).</param>
|
/// <param name="value">The value (-1,1 range).</param>
|
||||||
API_FUNCTION() void SetSteering(float value);
|
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>
|
/// <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.
|
/// 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>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user