Module |
|
Header |
/Engine/Plugins/Runtime/PhysXVehicles/Source/PhysXVehicles/Public/WheeledVehicleMovementComponent.h |
Include |
#include "WheeledVehicleMovementComponent.h" |
[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(Abstract,
HideCategories=(PlanarMovement, "Components|Movement|Planar", Activation, "Components|Activation"))
class UWheeledVehicleMovementComponent :
public UPawnMovementComponent,
public IRVOAvoidanceInterface
Name | Description | ||
---|---|---|---|
|
float |
AngErrorAccumulator |
Accumulator for RB replication errors |
|
float |
AvoidanceConsiderationRadius |
Area Radius to consider for RVO avoidance |
|
AvoidanceGroup |
Moving actor's group mask |
|
|
float |
AvoidanceLockTimer |
Remaining time of avoidance velocity lock |
|
AvoidanceLockVelocity |
Forced avoidance velocity, used when AvoidanceLockTimer is > 0 |
|
|
AvoidanceUID |
No default value, for now it's assumed to be valid if GetAvoidanceManager() returns non-NULL. |
|
|
AvoidanceVelocity |
Calculated avoidance velocity used to adjust steering and throttle |
|
|
float |
AvoidanceWeight |
De facto default value 0.5 (due to that being the default in the avoidance registration function), indicates RVO behavior. |
|
uint8: 1 |
bDeprecatedSpringOffsetMode |
Supports the old (before 4.14) way of applying spring forces. We used to offset from the vehicle center of mass instead of the spring location center of mass. You should only use this for existing content that hasn't been re-tuned. |
|
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. |
|
uint8: 1 |
bReverseAsBrake |
If true, the brake and reverse controls will behave in a more arcade fashion where holding reverse also functions as brake. |
|
uint8: 1 |
bUseRVOAvoidance |
If set, component will use RVO avoidance |
|
uint32: 1 |
bWasAvoidanceUpdated |
Was avoidance updated in this frame? |
|
float |
ChassisHeight |
Chassis height used for drag force computation (cm) |
|
float |
ChassisWidth |
Chassis width used for drag force computation (cm) |
|
float |
DebugDragMagnitude |
Debug drag magnitude last applied. |
|
float |
DragArea |
Drag area in cm^2. |
|
float |
DragCoefficient |
DragCoefficient of the vehicle chassis. |
|
float |
EstimatedMaxEngineSpeed |
Estimated mad speed for engine. |
|
GroupsToAvoid |
Will avoid other agents if they are in one of specified groups |
|
|
GroupsToIgnore |
Will NOT avoid other agents if they are in one of specified groups, higher priority than GroupsToAvoid |
|
|
float |
HandbrakeInput |
Handbrake output to physics system. Range 0...1. |
|
HandbrakeInputRate |
Rate at which input handbrake can rise and fall. |
|
|
HighForwardSpeedSubStepCount |
The sub-step count above the threshold longitudinal speed has a default of 1. |
|
|
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) |
|
|
LowForwardSpeedSubStepCount |
The sub-step count below the threshold longitudinal speed has a default of 3. |
|
|
float |
Mass |
Mass to set the vehicle chassis to. |
|
float |
MaxEngineRPM |
Max RPM for engine. |
|
float |
MaxNormalizedTireLoad |
Clamp normalized tire load to this value |
|
float |
MaxNormalizedTireLoadFiltered |
Clamp normalized tire load to this value |
|
MeshOnPhysicsStateChangeHandle |
Handle for delegate registered on mesh component |
|
|
float |
MinNormalizedTireLoad |
Clamp normalized tire load to this value |
|
float |
MinNormalizedTireLoadFiltered |
Clamp normalized tire load to this value |
|
PendingLaunchVelocity |
Temporarily holds launch velocity when pawn is to be launched so it happens at end of movement. |
|
|
physx::PxVehicl... |
PVehicle |
The instanced PhysX vehicle. |
|
physx::PxVehicl... |
PVehicleDrive |
|
|
float |
RawBrakeInput |
What the player has the brake 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. |
|
ReplicatedState |
Replicated state of vehicle |
|
|
float |
RVOAvoidanceHeight |
Vehicle Height to use for RVO avoidance (usually vehicle height) |
|
float |
RVOAvoidanceRadius |
Vehicle Radius to use for RVO avoidance (usually half of vehicle width) |
|
float |
RVOSteeringStep |
Value by which to alter steering per frame based on calculated avoidance |
|
float |
RVOThrottleStep |
Value by which to alter throttle per frame based on calculated avoidance |
|
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) |
|
float |
ThresholdLongitudinalSpeed |
PhysX sub-steps More sub-steps provides better stability but with greater computational cost. |
|
float |
ThrottleInput |
Accelerator output to physics system. Range 0...1. |
|
ThrottleInputRate |
Rate at which input throttle can rise and fall. |
|
|
VehicleSetupTag |
The value of PhysXVehicleManager::VehicleSetupTag when this vehicle created its physics state. |
|
|
Wheels |
Our instanced wheels. |
|
|
WheelSetups |
Wheels to create |
|
|
float |
WrongDirectionThreshold |
Auto-brake when vehicle forward speed is opposite of player input by at least this much (cm/s) |
Name | Description | |
---|---|---|
|
UWheeledVehicleMovementComponent ( |
Name | Description | ||
---|---|---|---|
|
float |
CalcBrakeInput() |
Compute brake input |
|
float |
CalcHandbrakeInput() |
Compute handbrake input |
|
float |
CalcSteeringInput() |
Compute steering input |
|
float |
CalcThrottleInput() |
Compute throttle input |
|
CalculateAvoidanceVelocity ( |
Calculate RVO avoidance and apply it to current velocity |
|
|
CheckSlipThreshold ( |
||
|
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.... |
|
|
GenerateTireForces ( |
Compute the forces generates from a spinning tire |
|
|
AController ... |
GetController() |
|
|
GetCurrentGear() |
Get current gear |
|
|
float |
GetEngineMaxRotationSpeed() |
Get current engine's max rotation speed |
|
float |
GetEngineRotationSpeed() |
Get current engine's rotation speed |
|
float |
GetForwardSpeed() |
How fast the vehicle is moving forward |
|
float |
GetMaxSpringForce() |
|
|
GetTargetGear() |
Get target gear |
|
|
GetUseAutoGears() |
Are gears being changed automatically? |
|
|
ServerUpdateState ( |
Pass current state to server |
|
|
SetAvoidanceEnabled ( |
Change avoidance state and register with RVO manager if necessary |
|
|
SetAvoidanceGroup ( |
||
|
SetAvoidanceGroupMask ( |
||
|
SetAvoidanceVelocityLock ( |
Lock avoidance velocity |
|
|
SetBrakeInput ( |
Set the user input for the vehicle Brake |
|
|
SetGearDown ( |
Set the user input for gear down |
|
|
SetGearUp ( |
Set the user input for gear up |
|
|
SetGroupsToAvoid ( |
||
|
SetGroupsToAvoidMask ( |
||
|
SetGroupsToIgnore ( |
||
|
SetGroupsToIgnoreMask ( |
||
|
SetHandbrakeInput ( |
Set the user input for handbrake |
|
|
SetSteeringInput ( |
Set the user input for the vehicle steering |
|
|
SetTargetGear |
Set the user input for gear (-1 reverse, 0 neutral, 1+ forward) |
|
|
SetThrottleInput ( |
Set the user input for the vehicle throttle |
|
|
SetUseAutoGears ( |
Set the flag that will be used to select auto-gears |
|
|
UpdateAvoidance ( |
Update RVO Avoidance for simulation |
|
|
UpdateDefaultAvoidance() |
Called in Tick to update data in RVO avoidance manager |
|
|
UpdateState ( |
Updates the COMOffset on the actual body instance Read current state for simulation |
Name | Description | ||
---|---|---|---|
|
SetUpdatedComponent ( |
Overridden to allow registration with components NOT owned by a Pawn. |
Name | Description | ||
---|---|---|---|
|
GetAvoidanceGroupMask() |
This actor's avoidance group mask |
|
|
GetGroupsToAvoidMask() |
Agent groups to avoid mask |
|
|
GetGroupsToIgnoreMask() |
Agent groups to ignore |
|
|
float |
GetRVOAvoidanceConsiderationRadius() |
The scaled collider radius to consider for RVO avoidance |
|
float |
GetRVOAvoidanceHeight() |
The scaled collider height to consider for RVO avoidance |
|
GetRVOAvoidanceOrigin() |
Get the Location from where the RVO avoidance should originate |
|
|
float |
GetRVOAvoidanceRadius() |
The scaled collider radius to consider for RVO avoidance |
|
GetRVOAvoidanceUID() |
Return the AvoidanceUID assigned by the Avoidance Manager during registration |
|
|
float |
GetRVOAvoidanceWeight() |
Returns the AvoidanceWeight assigned by the Avoidance Manager during registration |
|
GetVelocityForRVOConsideration() |
The velocity of the avoiding entity |
|
|
SetAvoidanceGroupMask ( |
Store the avoidance group mask |
|
|
SetGroupsToAvoidMask ( |
Store the groups to avoid mask |
|
|
SetGroupsToIgnoreMask ( |
Store the groups to ignore mask |
|
|
SetRVOAvoidanceUID ( |
BEGIN IRVOAvoidanceInterface |
|
|
SetRVOAvoidanceWeight ( |
Store the AvoidanceWeight generated by the Avoidance Manager |