UChaosWheeledVehicleMovementComponent

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

ChaosVehicles

Header

/Engine/Plugins/Experimental/ChaosVehiclesPlugin/Source/ChaosVehicles/Public/ChaosWheeledVehicleMovementComponent.h

Include

#include "ChaosWheeledVehicleMovementComponent.h"

Syntax

UCLASS(ClassGroup=(Physics), Meta=(BlueprintSpawnableComponent),
       HideCategories=(PlanarMovement, "Components|Movement|Planar", Activation, "Components|Activation"))
class UChaosWheeledVehicleMovementComponent : public UChaosVehicleMovementComponent

Variables

Name Description

Public variable UProperty Category, EditAnywhere

bool

 

bMechanicalSimEnabled

Public variable UProperty Category, EditAnywhere

bool

 

bSuspensionEnabled

Public variable UProperty Category, EditAnywhere

bool

 

bWheelFrictionEnabled

Public variable UProperty Category, EditAnywhere, Meta

FVehicleDiffere...

 

DifferentialSetup

Differential

Public variable UProperty Category, EditAnywhere, Meta

FVehicleEngineC...

 

EngineSetup

Engine

Public variable UProperty Category, EditAnywhere

FVehicleSteerin...

 

SteeringSetup

Transmission data

Public variable UProperty Category, EditAnywhere, Meta

FVehicleTransmi...

 

TransmissionSetup

Transmission data

Public variable UProperty Category BlueprintReadOnly Transient duplicatetransient

TArray< class U...

 

Wheels

Our instanced wheels.

Public variable UProperty Category, EditAnywhere

TArray< FChaosW...

 

WheelSetups

Wheels to create

Public variable UProperty Category, EditAnywhere

FCollisionRespo...

 

WheelTraceCollisionResponses

Constructors

Functions

Name Description

Public function Static UFunction BlueprintPure, Category

void

 

BreakWheeledSnapshot

(
    const FWheeledSnaphotData& Snapsho...,
    FTransform& Transform,
    FVector& LinearVelocity,
    FVector& AngularVelocity,
    int& SelectedGear,
    float& EngineRPM,
    TArray< FWheelSnapshot >& WheelSna...
)

Public function Static UFunction BlueprintPure, Category

void

 

BreakWheelSnapshot

(
    const FWheelSnapshot& Snapshot,
    float& SuspensionOffset,
    float& WheelRotationAngle,
    float& SteeringAngle,
    float& WheelRadius,
    float& WheelAngularVelocity
)

Public function Static UFunction BlueprintPure, Category

void

 

BreakWheelStatus

(
    const FWheelStatus& Status,
    bool& bInContact,
    FVector& ContactPoint,
    UPhysicalMaterial*& PhysMateri...,
    float& NormalizedSuspensionLength,
    float& SpringForce,
    float& SlipAngle,
    bool& bIsSlipping,
    float& SlipMagnitude,
    bool& bIsSkidding,
    float& SkidMagnitude,
    FVector& SkidNormal
)

Protected function Virtual

void

 

CreateWheels()

Instantiate and setup our wheel objects

Protected function Virtual

void

 

DestroyWheels()

Release our wheel objects

Public function UFunction BlueprintCallable, Category

void

 

EnableMechanicalSim

(
    bool InState
)

Enable or completely bypass the ProcessMechanicalSimulation call

Public function UFunction BlueprintCallable, Category

void

 

EnableSuspension

(
    bool InState
)

Enable or completely bypass the ApplySuspensionForces call

Public function UFunction BlueprintCallable, Category

void

 

EnableWheelFriction

(
    bool InState
)

Enable or completely bypass the ApplyWheelFrictionForces call

Protected function

void

 

FillWheelOutputState()

Update.

Public function Const UFunction BlueprintCallable, Category

float

 

GetEngineMaxRotationSpeed()

Get current engine's max rotation speed

Public function Const UFunction BlueprintCallable, Category

float

 

GetEngineRotationSpeed()

Get current engine's rotation speed

Public function Const UFunction BlueprintCallable, Category

int

 

GetNumWheels()

Public function Virtual Const UFunction BlueprintCallable, Category

FWheeledSnap...

 

GetSnapshot()

Grab a snapshot of the vehicle instance dynamic state

Protected function Const

const FVecto...

 

GetWheelLayoutDimensions()

Get distances between wheels - primarily a debug display helper

Protected function Virtual

FVector

 

GetWheelRestingPosition

(
    const FChaosWheelSetup& WheelSetup
)

Get the local position of the wheel at rest

Public function Const UFunction BlueprintCallable, Category

const FWheel...

 

GetWheelState

(
    int WheelIndex
)

Get a wheels current simulation state

Public function Static UFunction BlueprintPure, Category

FWheeledSnap...

 

MakeWheeledSnapshot

(
    FTransform Transform,
    FVector LinearVelocity,
    FVector AngularVelocity,
    int SelectedGear,
    float EngineRPM,
    const TArray< FWheelSnapshot >& Wh...
)

Public function Static UFunction BlueprintPure, Category

FWheelSnapsh...

 

MakeWheelSnapshot

(
    float SuspensionOffset,
    float WheelRotationAngle,
    float SteeringAngle,
    float WheelRadius,
    float WheelAngularVelocity
)

Public function Static UFunction BlueprintPure, Category

FWheelStatus

 

MakeWheelStatus

(
    bool bInContact,
    FVector& ContactPoint,
    UPhysicalMaterial* PhysMateria...,
    float NormalizedSuspensionLength,
    float SpringForce,
    float SlipAngle,
    bool bIsSlipping,
    float SlipMagnitude,
    bool bIsSkidding,
    float SkidMagnitude,
    FVector& SkidNormal
)

Public function Static

void

 

NextDebugPage()

Display next debug page

Public function Static

void

 

PrevDebugPage()

Display previous debug page

Protected function

void

 

RecalculateAxles()

Maps UChaosVehicleWheel Axle to a wheel index

Public function UFunction BlueprintCallable, Category

void

 

SetABSEnabled

(
    int WheelIndex,
    bool Enabled
)

Public function UFunction BlueprintCallable, Category

void

 

SetAffectedByBrake

(
    int WheelIndex,
    bool Enabled
)

Public function UFunction BlueprintCallable, Category

void

 

SetAffectedByEngine

(
    int WheelIndex,
    bool Enabled
)

Public function UFunction BlueprintCallable, Category

void

 

SetAffectedByHandbrake

(
    int WheelIndex,
    bool Enabled
)

Public function UFunction BlueprintCallable, Category

void

 

SetAffectedBySteering

(
    int WheelIndex,
    bool Enabled
)

Public function UFunction BlueprintCallable, Category

void

 

SetDifferentialFrontRearSplit

(
    float FrontRearSlpit
)

Public function UFunction BlueprintCallable, Category

void

 

SetDownforceCoefficient

(
    float DownforceCoeff
)

Public function UFunction BlueprintCallable, Category

void

 

SetDragCoefficient

(
    float DragCoeff
)

Public function UFunction BlueprintCallable, Category

void

 

SetMaxEngineTorque

(
    float Torque
)

Change handling via blueprint at runtime

Public function Virtual UFunction BlueprintCallable, Category

void

 

SetSnapshot

(
    const FWheeledSnaphotData& Snapsho...
)

Set snapshot of vehicle instance dynamic state

Public function UFunction BlueprintCallable, Category

void

 

SetTractionControlEnabled

(
    int WheelIndex,
    bool Enabled
)

Protected function

void

 

SetupSuspension

Setup calculated suspension parameters

Protected function Virtual

void

 

SetupVehicleShapes()

Set up the chassis and wheel shapes

Public function UFunction BlueprintCallable, Category

void

 

SetWheelClass

(
    int WheelIndex,
    TSubclassOf< UChaosVehicleWheel > I...
)

Public function UFunction BlueprintCallable, Category

void

 

SetWheelFrictionMultiplier

(
    int WheelIndex,
    float Friction
)

Public function UFunction BlueprintCallable, Category

void

 

SetWheelHandbrakeTorque

(
    int WheelIndex,
    float Torque
)

Public function UFunction BlueprintCallable, Category

void

 

SetWheelMaxBrakeTorque

(
    int WheelIndex,
    float Torque
)

Public function UFunction BlueprintCallable, Category

void

 

SetWheelMaxSteerAngle

(
    int WheelIndex,
    float AngleDegrees
)

Public function UFunction BlueprintCallable, Category

void

 

SetWheelRadius

(
    int WheelIndex,
    float Radius
)

Public function UFunction BlueprintCallable, Category

void

 

SetWheelSlipGraphMultiplier

(
    int WheelIndex,
    float Multiplier
)

Public function

void

 

SetWheelTraceAllChannels

(
    ECollisionResponse NewResponse
)

Set all channels to the specified response - for wheel raycasts

Public function

void

 

SetWheelTraceResponseToChannel

(
    ECollisionChannel Channel,
    ECollisionResponse NewResponse
)

Set the response of this body to the supplied settings - for wheel raycasts

Overridden from UChaosVehicleMovementComponent

Name Description

Public function Virtual Const

bool

 

CanCreateVehicle()

Are the configuration references configured sufficiently that the vehicle can be created

Protected function Virtual

void

 

ComputeConstants()

Re-Compute any runtime constants values that rely on setup data

Public function Virtual

TUniquePtr< ...

 

CreatePhysicsVehicle()

Protected function Virtual

void

 

CreateVehicle()

Create and setup the Chaos vehicle

Protected function Virtual

void

 

DrawDebug

(
    UCanvas* Canvas,
    float& YL,
    float& YPos
)

Draw 2D debug text graphs on UI for the wheels, suspension and other systems

Protected function Virtual

void

 

FixupSkeletalMesh()

Skeletal mesh needs some special handling in the vehicle case

Public function Virtual

float

 

GetSuspensionOffset

(
    int WheelIndex
)

Public function Virtual

void

 

ParallelUpdate

(
    float DeltaSeconds
)

Get output data from Physics Thread.

Public function Virtual

void

 

ResetVehicleState()

Public function Virtual

void

 

SetupVehicle

Allocate and setup the Chaos vehicle

Protected function Virtual

void

 

Update

(
    float DeltaTime
)

Fill Async input state

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

OnCreatePhysicsState()

Used to create any physics engine information for this component

Public function Virtual

void

 

OnDestroyPhysicsState()

Used to shut down and pysics engine structure for this component

Overridden from UObject

Name Description

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

End UObject interface Respond to a property change in editor

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Get Collision ResponseToChannels container for this component

Constants

Name

Description

DebugPage