UChaosWheeledVehicleMovementComponent

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

ChaosVehicles

Header

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

Include

#include "ChaosWheeledVehicleMovementComponent.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(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

Constructors

Name Description

Public function

UChaosWheeledVehicleMovementComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Protected function Virtual

void

 

ApplySuspensionForces

(
    float DeltaTime
)

Calculate and apply chassis suspension forces

Protected function Virtual

void

 

ApplyWheelFrictionForces

(
    float DeltaTime
)

Calculate and apply lateral and longitudinal friction forces from wheels

Public function Static UFunction BlueprintPure, Category

void

 

BreakWheelStatus

(
    const FWheelStatus& Status,
    bool& bInContact,
    FVector& ContactPoint,
    UPhysicalMaterial*& PhysMateri...,
    float& NormalizedSuspensionLength,
    float& SpringForce,
    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

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()

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

FWheelStatus

 

MakeWheelStatus

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

Public function Static

void

 

NextDebugPage()

Display next debug page

Protected function Virtual

void

 

PerformSuspensionTraces

(
    const TArray< Chaos::FSuspensionTra...
)

Perform suspension ray/shape traces

Public function Static

void

 

PrevDebugPage()

Display previous debug page

Protected function Virtual

void

 

ProcessMechanicalSimulation

(
    float DeltaTime
)

Update the engine/transmission simulation

Protected function Virtual

void

 

ProcessSteering()

Process steering mechanism

Protected function

void

 

RecalculateAxles()

Maps UChaosVehicleWheel Axle to a wheel index

Protected function

void

 

SetupSuspension()

Setup calculated suspension parameters

Protected function Virtual

void

 

SetupVehicleShapes()

Set up the chassis and wheel shapes

Overridden from UChaosVehicleMovementComponent

Name Description

Protected function Virtual

void

 

ApplyInput

(
    float DeltaTime
)

Pass control Input to the vehicle systems

Public function Virtual Const

bool

 

CanCreateVehicle()

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

Public function Virtual Const

bool

 

CanSimulate()

Are the appropriate vehicle systems specified such that physics vehicle simulation is possible

Protected function Virtual

void

 

ComputeConstants()

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

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

 

DrawDebug3D()

Draw 3D debug lines and things along side the 3D model

Protected function Virtual

void

 

FixupSkeletalMesh()

Skeletal mesh needs some special handling in the vehicle case

Protected function Virtual

void

 

SetupVehicle()

Allocate and setup the Chaos vehicle

Public function Virtual

void

 

TickVehicle

(
    float DeltaTime
)

Tick this vehicle sim right before input is sent to the vehicle system

Protected function Virtual

void

 

UpdateSimulation

(
    float DeltaTime
)

Advance the vehicle simulation

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
)

UObject interface

Constants

Name

Description

DebugPage

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss