Vehicle input controller component.
More...
#include <VehicleController.hpp>
|
| float | forwardInput = 0.0f |
| | Forward/backward input (-1.0 = full brake/reverse, 0.0 = neutral, 1.0 = full throttle).
|
| float | steeringInput = 0.0f |
| | Steering input (-1.0 = full left, 0.0 = straight, 1.0 = full right).
|
| float | brakeInput = 0.0f |
| | Brake input (0.0 = no brake, 1.0 = full brake).
|
| float | handBrakeInput = 0.0f |
| | Handbrake input (0.0 = off, 1.0 = full handbrake).
|
Vehicle input controller component.
Attach this component to a vehicle chassis entity to control it. Set input values between -1.0 and 1.0, which will be applied to the Jolt vehicle controller during the physics update.
◆ ResetInputs()
| void Physics::Component::VehicleController::ResetInputs |
( |
| ) |
|
|
inline |
Reset all inputs to neutral.
◆ SetBrake()
| void Physics::Component::VehicleController::SetBrake |
( |
float | value | ) |
|
|
inline |
Set brake input.
- Parameters
-
| value | Input value clamped to [0.0, 1.0] |
◆ SetForward()
| void Physics::Component::VehicleController::SetForward |
( |
float | value | ) |
|
|
inline |
Set forward/backward input.
- Parameters
-
| value | Input value clamped to [-1.0, 1.0] |
◆ SetHandBrake()
| void Physics::Component::VehicleController::SetHandBrake |
( |
float | value | ) |
|
|
inline |
Set handbrake input.
- Parameters
-
| value | Input value clamped to [0.0, 1.0] |
◆ SetSteering()
| void Physics::Component::VehicleController::SetSteering |
( |
float | value | ) |
|
|
inline |
Set steering input.
- Parameters
-
| value | Input value clamped to [-1.0, 1.0] |
◆ brakeInput
| float Physics::Component::VehicleController::brakeInput = 0.0f |
Brake input (0.0 = no brake, 1.0 = full brake).
◆ forwardInput
| float Physics::Component::VehicleController::forwardInput = 0.0f |
Forward/backward input (-1.0 = full brake/reverse, 0.0 = neutral, 1.0 = full throttle).
◆ handBrakeInput
| float Physics::Component::VehicleController::handBrakeInput = 0.0f |
Handbrake input (0.0 = off, 1.0 = full handbrake).
◆ steeringInput
| float Physics::Component::VehicleController::steeringInput = 0.0f |
Steering input (-1.0 = full left, 0.0 = straight, 1.0 = full right).
The documentation for this struct was generated from the following file: