Choose your operating system:
Windows
macOS
Linux
| UObjectBase
|
Module |
|
Header |
/Engine/Plugins/Experimental/ChaosVehiclesPlugin/Source/ChaosVehicles/Public/ChaosVehicleMovementComponent.h |
Include |
#include "ChaosVehicleMovementComponent.h" |
UCLASS(Abstract,
HideCategories=(PlanarMovement, "Components|Movement|Planar", Activation, "Components|Activation"))
class UChaosVehicleMovementComponent : public UPawnMovementComponent
Base component to handle the vehicle simulation for an actor.
Name | Description | ||
---|---|---|---|
|
Aerofoils |
Optional aerofoil setup - can be used for car spoilers or aircraft wings/elevator/rudder |
|
|
float |
AngErrorAccumulator |
Accumulator for RB replication errors |
|
bEnableCenterOfMassOverride |
Enable to override the calculated COM position with your own fixed value - this prevents the vehicle handling changing when the asset changes |
|
|
uint8: 1 |
bParkEnabled |
|
|
float |
BrakeInput |
Brake output to physics system. Range 0...1. |
|
BrakeInputRate |
Rate at which input brake can rise and fall. |
|
|
uint8: 1 |
bRawGearDownInput |
True if the player is holding gear down. |
|
uint8: 1 |
bRawGearUpInput |
True if the player is holding gear up. |
|
uint8: 1 |
bRawHandbrakeInput |
True if the player is holding the handbrake. |
|
bRequiresControllerForInputs |
Bypass the need for a controller in order for the controls to be processed. |
|
|
uint8: 1 |
bReverseAsBrake |
If true, the brake and reverse controls will behave in a more arcade fashion where holding reverse also functions as brake. |
|
uint32: 1 |
bWasAvoidanceUpdated |
Was avoidance updated in this frame? |
|
CenterOfMassOverride |
The center of mass override value, this value overrides the calculated COM and the COM offset value in the mesh is also ignored. |
|
|
float |
ChassisHeight |
Chassis height used for drag force computation (cm) |
|
float |
ChassisWidth |
Chassis width used for drag force computation (cm) |
|
CurAsyncInput |
||
|
CurAsyncOutput |
||
|
CurAsyncType |
||
|
float |
DebugDragMagnitude |
Debug drag magnitude last applied. |
|
float |
DownforceCoefficient |
DownforceCoefficient of the vehicle chassis - force pressing vehicle into ground at speed |
|
float |
DragArea |
Drag area in Meters^2. |
|
float |
DragCoefficient |
DragCoefficient of the vehicle chassis - force resisting forward motion at speed |
|
float |
HandbrakeInput |
Handbrake output to physics system. Range 0...1. |
|
HandbrakeInputRate |
Rate at which input handbrake can rise and fall. |
|
|
float |
IdleBrakeInput |
How much to press the brake when the player has release throttle. |
|
InertiaTensorScale |
Scales the vehicle's inertia in each direction (forward, right, up) |
|
|
float |
Mass |
Mass to set the vehicle chassis to. |
|
MeshOnPhysicsStateChangeHandle |
Handle for delegate registered on mesh component |
|
|
NextAsyncOutput |
||
|
float |
OutputInterpAlpha |
|
|
OutputsWaitingOn |
||
|
float |
PitchInput |
Body Pitch output to physics system. Range -1...1. |
|
PitchInputRate |
Rate at which input pitch can rise and fall. |
|
|
TUniquePtr< FPh... |
PVehicleOutput |
|
|
float |
RawBrakeInput |
What the player has the brake set to. Range -1...1. |
|
float |
RawPitchInput |
What the player has the pitch set to. Range -1...1. |
|
float |
RawRollInput |
What the player has the roll set to. Range -1...1. |
|
float |
RawSteeringInput |
What the player has the steering set to. Range -1...1. |
|
float |
RawThrottleInput |
What the player has the accelerator set to. Range -1...1. |
|
float |
RawYawInput |
What the player has the yaw set to. Range -1...1. |
|
ReplicatedState |
Replicated state of vehicle |
|
|
float |
RollInput |
Body Roll output to physics system. Range -1...1. |
|
RollInputRate |
Rate at which input roll can rise and fall. |
|
|
float |
SleepSlopeLimit |
Option to apply some aggressive sleep logic if slopes up Z is less than this value, i.e value = Cos(SlopeAngle) so 0.866 will sleep up to 30 degree slopes |
|
float |
SleepThreshold |
Option to apply some aggressive sleep logic, larger number is more agressive, 0 disables |
|
StabilizeControl |
Arcade style control of vehicle |
|
|
float |
SteeringInput |
Steering output to physics system. Range -1...1. |
|
SteeringInputRate |
Rate at which input steering can rise and fall. |
|
|
float |
StopThreshold |
Auto-brake when absolute vehicle forward speed is less than this (cm/s) |
|
TargetRotationControl |
Arcade style direct control of vehicle rotation via torque force |
|
|
float |
ThrottleInput |
Accelerator output to physics system. Range 0...1. |
|
ThrottleInputRate |
Rate at which input throttle can rise and fall. |
|
|
Thrusters |
Optional thruster setup, use one or more as your main engine or as supplementary booster |
|
|
TorqueControl |
Arcade style direct control of vehicle rotation via torque force |
|
|
TransmissionType |
||
|
VehicleSetupTag |
Used to recreate the physics if the blueprint changes. |
|
|
TUniquePtr< UCh... |
VehicleSimulationPT |
|
|
VehicleState |
||
|
float |
WrongDirectionThreshold |
Auto-brake when vehicle forward speed is opposite of player input by at least this much (cm/s) |
|
float |
YawInput |
Body Yaw output to physics system. Range -1...1. |
|
YawInputRate |
Rate at which input yaw can rise and fall. |
Name | Description | |
---|---|---|
|
UChaosVehicleMovementComponent ( |
Name | Description | ||
---|---|---|---|
|
float |
CalcHandbrakeInput() |
Compute handbrake input |
|
float |
CalcPitchInput() |
Compute pitch input |
|
float |
CalcRollInput() |
Compute roll input |
|
float |
CalcSteeringInput() |
Compute steering input |
|
CalcThrottleBrakeInput ( |
Compute throttle & brake input |
|
|
float |
CalcThrottleDownInput() |
|
|
float |
CalcThrottleUpInput() |
Compute throttle inputs |
|
float |
CalcYawInput() |
Compute yaw input |
|
CanCreateVehicle() |
Return true if we are ready to create a vehicle, false if the setup has missing references |
|
|
ClearAllInput() |
||
|
ClearInput() |
Clear all interpolated inputs to default values. |
|
|
ClearRawInput() |
Clear all raw inputs to default values. |
|
|
ComputeConstants() |
When vehicle is created we want to compute some helper data like drag area, etc.... |
|
|
TUniquePtr< ... |
CreatePhysicsVehicle() |
|
|
CreateVehicle() |
Create and setup the Chaos vehicle |
|
|
DecreaseThrottleInput ( |
Decrease the vehicle throttle position [throttle range normalized 0 to 1] |
|
|
DrawDebug ( |
Draw debug text for the wheels and suspension |
|
|
DrawLine2D |
Draw 2D debug line to UI canvas |
|
|
EnableSelfRighting ( |
||
|
FinalizeSimCallbackData ( |
||
|
FixupSkeletalMesh() |
Skeletal mesh needs some special handling in the vehicle case |
|
|
GetBaseSnapshot ( |
Grab a snapshot of the vehicle instance dynamic state |
|
|
FBodyInstanc... |
GetBodyInstance() |
|
|
const FBodyI... |
GetBodyInstance() |
|
|
float |
GetBrakeInput() |
Get the user input for the vehicle brake - can use this to feed control to a connected trailer |
|
GetCurrentGear() |
Get current gear |
|
|
float |
GetForwardAcceleration() |
|
|
float |
GetForwardSpeed() |
How fast the vehicle is moving forward |
|
float |
GetForwardSpeedMPH() |
How fast the vehicle is moving forward |
|
GetHandbrakeInput() |
Get the user input for the vehicle handbrake - can use this to feed control to a connected trailer |
|
|
UMeshCompone... |
GetMesh() |
Get the mesh this vehicle is tied to |
|
USkeletalMes... |
GetSkeletalMesh() |
Get Mesh cast as USkeletalMeshComponent, may return null if cast fails |
|
UStaticMeshC... |
GetStaticMesh() |
Get Mesh cast as UStaticMeshComponent, may return null if cast fails |
|
float |
GetSteeringInput() |
Get the user input for the vehicle steering - can use this to feed control to a connected trailer |
|
float |
GetSuspensionOffset ( |
|
|
GetTargetGear() |
Get target gear |
|
|
float |
GetThrottleInput() |
Get the user input for the vehicle throttle - can use this to feed control to a connected trailer |
|
GetUseAutoGears() |
Are gears being changed automatically? |
|
|
IncreaseThrottleInput ( |
Increase the vehicle throttle position [throttle range normalized 0 to 1] |
|
|
IsParked() |
Is the vehicle in park mode |
|
|
LocateBoneOffset |
Location local coordinates of named bone in skeleton, apply additional offset or just use offset if no bone located |
|
|
ParallelUpdate ( |
Get output data from Physics Thread. |
|
|
TUniquePtr< ... |
PhysicsVehicleOutput() |
|
|
PostSetupVehicle() |
Do some final setup after the Chaos vehicle gets created |
|
|
PreTickGT ( |
Updates the vehicle tuning and other state such as user input. |
|
|
ProcessSleeping ( |
Option to aggressively sleep the vehicle |
|
|
ResetVehicle() |
Reset some vehicle state - call this if you are say creating pool of vehicles that get reused and you don't want to carry over the previous state |
|
|
ResetVehicleState() |
||
|
ServerUpdateState ( |
Pass current state to server |
|
|
SetBaseSnapshot ( |
Set snapshot of vehicle instance dynamic state |
|
|
SetBrakeInput ( |
Set the user input for the vehicle Brake [range 0 to 1] |
|
|
SetChangeDownInput ( |
Set the user input for gear down |
|
|
SetChangeUpInput ( |
Set the user input for gear up |
|
|
TUniquePtr< ... |
SetCurrentAsyncInputOutput ( |
|
|
SetCurrentAsyncInputOutputInternal ( |
||
|
SetCurrentAsyncInputOutputInternal ( |
||
|
SetHandbrakeInput ( |
Set the user input for handbrake |
|
|
SetOverrideController ( |
Allow the player controller of a different pawn to control this vehicle |
|
|
SetParked ( |
Set the vehicle in park mode |
|
|
SetPitchInput ( |
Set the user input for the vehicle pitch [range -1 to 1] |
|
|
SetRequiresControllerForInputs ( |
Set the flag that determines whether a controller is required to set control inputs |
|
|
SetRollInput ( |
Set the user input for the vehicle roll [range -1 to 1] |
|
|
SetSleeping ( |
Set the vehicle sleeping (bEnableSleep=true) or wake it up (bEnableSleep=false) |
|
|
SetSteeringInput ( |
Set the user input for the vehicle steering [range -1 to 1] |
|
|
SetTargetGear |
Set the user input for gear (-1 reverse, 0 neutral, 1+ forward) |
|
|
SetThrottleInput ( |
Set the user input for the vehicle throttle [range 0 to 1] |
|
|
SetupVehicle |
Allocate and setup the Chaos vehicle |
|
|
SetupVehicleMass() |
Adjust the Chaos Physics mass |
|
|
SetUseAutomaticGears ( |
Set the flag that will be used to select auto-gears |
|
|
SetYawInput ( |
Set the user input for the vehicle yaw [range -1 to 1] |
|
|
ShowDebugInfo ( |
||
|
Update ( |
||
|
UpdateMassProperties ( |
||
|
UpdateState ( |
Read current state for simulation |
Name | Description | ||
---|---|---|---|
|
AController ... |
GetController() |
Get our controller |
Name | Description | ||
---|---|---|---|
|
SetUpdatedComponent ( |
Overridden to allow registration with components NOT owned by a Pawn. |
|
|
StopMovementImmediately() |
Stops movement immediately (zeroes velocity, usually zeros acceleration for components with acceleration). |
Name | Description | ||
---|---|---|---|
|
HasValidPhysicsState() |
Returns true if the physics state exists |
|
|
OnCreatePhysicsState() |
Used to create any physics engine information for this component |
|
|
OnDestroyPhysicsState() |
Used to shut down and physics engine structure for this component |
|
|
ShouldCreatePhysicsState() |
Return true if it's suitable to create a physics representation of the vehicle at this time |
Name | Description | ||
---|---|---|---|
|
PostEditChangeProperty ( |
End UObject interface Respond to a property change in editor |
|
|
Serialize ( |
UObject interface |
Name |
Description |
|
---|---|---|
|
FAsyncOutputWrapper |