CARLA
Loading...
Searching...
No Matches
UCarlaVehicleAnimationInstance Class Reference

Parent class of the vehicle animation blueprints. More...

#include <CarlaVehicleAnimationInstance.h>

Inheritance diagram for UCarlaVehicleAnimationInstance:

Classes

struct  FWheel

Public Member Functions

const FWheelAnimationData * GetWheelPose (int32 WheelIndex) const
 The pose last written for a wheel, or nullptr if there is no such wheel.
virtual void NativeUpdateAnimation (float DeltaSeconds) override

Private Member Functions

void BeginRolling ()
TArray< FWheelAnimationData > & GetWheelPoses ()
void InitWheels ()
void RollWheels (const ACarlaWheeledVehicle &Vehicle, float DeltaSeconds)
bool ShouldRollWheels (const ACarlaWheeledVehicle &Vehicle) const
void TrackWheelLocations ()
 World locations of the wheels, kept while not rolling.
void UpdateWheelAnimationOverride (const ACarlaWheeledVehicle &Vehicle)

Private Attributes

bool bRollingWheels = false
bool bWasWheelAnimationOverridden = false
float MaxTravelSpeed = 15000.0f
 cm/s. A wheel moving faster than this was teleported, and is not turned.
TArray< FWheel > Wheels

Detailed Description

Parent class of the vehicle animation blueprints.

Draws the vehicle's overridden wheel poses, and otherwise, while Chaos is not simulating the vehicle, which is when the engine leaves the wheels frozen, rolls them by the distance they travel.

Definition at line 22 of file CarlaVehicleAnimationInstance.h.

Member Function Documentation

◆ BeginRolling()

void UCarlaVehicleAnimationInstance::BeginRolling ( )
private

Definition at line 102 of file CarlaVehicleAnimationInstance.cpp.

References GetWheelPoses(), InitWheels(), and Wheels.

Referenced by NativeUpdateAnimation().

◆ GetWheelPose()

const FWheelAnimationData * UCarlaVehicleAnimationInstance::GetWheelPose ( int32 WheelIndex) const

The pose last written for a wheel, or nullptr if there is no such wheel.

Definition at line 160 of file CarlaVehicleAnimationInstance.cpp.

◆ GetWheelPoses()

TArray< FWheelAnimationData > & UCarlaVehicleAnimationInstance::GetWheelPoses ( )
private

◆ InitWheels()

void UCarlaVehicleAnimationInstance::InitWheels ( )
private

◆ NativeUpdateAnimation()

void UCarlaVehicleAnimationInstance::NativeUpdateAnimation ( float DeltaSeconds)
overridevirtual

◆ RollWheels()

◆ ShouldRollWheels()

bool UCarlaVehicleAnimationInstance::ShouldRollWheels ( const ACarlaWheeledVehicle & Vehicle) const
private

Definition at line 52 of file CarlaVehicleAnimationInstance.cpp.

References Vehicle.

Referenced by NativeUpdateAnimation().

◆ TrackWheelLocations()

void UCarlaVehicleAnimationInstance::TrackWheelLocations ( )
private

World locations of the wheels, kept while not rolling.

Definition at line 83 of file CarlaVehicleAnimationInstance.cpp.

References InitWheels(), and Wheels.

Referenced by NativeUpdateAnimation().

◆ UpdateWheelAnimationOverride()

void UCarlaVehicleAnimationInstance::UpdateWheelAnimationOverride ( const ACarlaWheeledVehicle & Vehicle)
private

Member Data Documentation

◆ bRollingWheels

bool UCarlaVehicleAnimationInstance::bRollingWheels = false
private

Definition at line 68 of file CarlaVehicleAnimationInstance.h.

Referenced by NativeUpdateAnimation().

◆ bWasWheelAnimationOverridden

bool UCarlaVehicleAnimationInstance::bWasWheelAnimationOverridden = false
private

Definition at line 70 of file CarlaVehicleAnimationInstance.h.

Referenced by UpdateWheelAnimationOverride().

◆ MaxTravelSpeed

float UCarlaVehicleAnimationInstance::MaxTravelSpeed = 15000.0f
private

cm/s. A wheel moving faster than this was teleported, and is not turned.

Definition at line 37 of file CarlaVehicleAnimationInstance.h.

Referenced by RollWheels().

◆ Wheels

TArray<FWheel> UCarlaVehicleAnimationInstance::Wheels
private

The documentation for this class was generated from the following files: