Merge branch 'GetVehicleThrottle' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-GetVehicleThrottle
This commit is contained in:
@@ -190,6 +190,11 @@ void WheeledVehicle::SetThrottle(float value)
|
||||
_throttle = Math::Clamp(value, -1.0f, 1.0f);
|
||||
}
|
||||
|
||||
float WheeledVehicle::GetThrottle()
|
||||
{
|
||||
return _throttle;
|
||||
}
|
||||
|
||||
void WheeledVehicle::SetSteering(float value)
|
||||
{
|
||||
_steering = Math::Clamp(value, -1.0f, 1.0f);
|
||||
|
||||
@@ -541,6 +541,12 @@ public:
|
||||
/// <param name="value">The value (-1,1 range). When using UseReverseAsBrake it can be negative and will be used as brake and backward driving.</param>
|
||||
API_FUNCTION() void SetThrottle(float value);
|
||||
|
||||
/// <summary>
|
||||
/// Get the vehicle throttle. It is the analog accelerator 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 throttle.</returns>
|
||||
API_FUNCTION() float GetThrottle();
|
||||
|
||||
/// <summary>
|
||||
/// Sets the input for 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>
|
||||
|
||||
Reference in New Issue
Block a user