LEAP Documentation 40220
Documentation for the LEAP project
UProjectXVehicleMovementComponent Class Reference

#include <VehicleMovementComponent.h>

Inheritance diagram for UProjectXVehicleMovementComponent:

Public Member Functions

virtual class FNetworkPredictionData_Client * GetPredictionData_Client () const override
 
bool IsGroundedInFlyingMode () const
 
FORCEINLINE uint8 GetPackedAcceleration () const
 
FORCEINLINE float GetFlySpeedCache () const
 
virtual float GetMaxAcceleration () const override
 
void CalcVelocity (float DeltaTime, float Friction, bool bFluid, float BrakingDeceleration) override
 
void UpdateAltitudeLimitMultiplier (float NewAltitudeLimitMultiplier)
 

Public Attributes

float GravityFallDetectionDistance = 300.0f
 
bool bRightInputIsSteering = false
 
float SteeringRate = 100.0f
 
float FlightDownwardsMultiplier = 2.0f
 
uint8 bWantsToBoost: 1
 
uint8 bWantsToBoostUpwards: 1
 
uint8 bWantsSteerRight: 1
 
uint8 bWantsSteerLeft: 1
 

Protected Member Functions

virtual void BeginPlay () override
 
virtual bool ShouldUpdateSimulationVisuals () override
 
virtual void TickComponent (float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override
 
virtual float GetMaxSpeed () const override
 
virtual void UpdateFromCompressedFlags (uint8 Flags) override
 
virtual FVector GetFloorNormalAngle () const
 
virtual bool CanAttemptJump () const override
 
virtual void PhysicsRotation (float DeltaTime) override
 
virtual bool ClientUpdatePositionAfterServerUpdate () override
 
void PackAcceleration ()
 
virtual FVector GetFallingLateralAcceleration (float DeltaTime) override
 

Protected Attributes

float SmoothRotationRate = 4.f
 
FVector LinearVelocityLocal = FVector::ZeroVector
 
FRotator TargetRotation
 
TArray< UPrimitiveComponent * > CollisionComponents
 
UPrimitiveComponent * BlockedComponent = NULL
 
uint8 PackedAcceleration = 0
 
float LateralAirControl = 1.0f
 
float ForwardAirControl = 1.0f
 
float FluidFrictionOverride = 0.0f
 
bool bBoostWhileFalling = false
 
float UpwardsBoostForce = 4000.f
 
float UpwardsBoostMaxZ = 2000.f
 
FVector AccelerationUnlessZero
 
float AccumulatedRotationRate = 0.f
 
float FlySpeedCache = INDEX_NONE
 
float RotationSpeed
 
bool bUseCustomCollisionShapes = false
 
FVector FloorNormalAngle
 
bool bIsGroundedInFlyingMode = false
 

Friends

class AProjectXVehicle
 

Member Function Documentation

◆ BeginPlay()

void UProjectXVehicleMovementComponent::BeginPlay ( )
overrideprotectedvirtual

◆ CalcVelocity()

void UProjectXVehicleMovementComponent::CalcVelocity ( float  DeltaTime,
float  Friction,
bool  bFluid,
float  BrakingDeceleration 
)
override

◆ CanAttemptJump()

bool UProjectXVehicleMovementComponent::CanAttemptJump ( ) const
overrideprotectedvirtual

◆ ClientUpdatePositionAfterServerUpdate()

bool UProjectXVehicleMovementComponent::ClientUpdatePositionAfterServerUpdate ( )
overrideprotectedvirtual

◆ GetFallingLateralAcceleration()

FVector UProjectXVehicleMovementComponent::GetFallingLateralAcceleration ( float  DeltaTime)
overrideprotectedvirtual

◆ GetFloorNormalAngle()

virtual FVector UProjectXVehicleMovementComponent::GetFloorNormalAngle ( ) const
inlineprotectedvirtual

◆ GetFlySpeedCache()

FORCEINLINE float UProjectXVehicleMovementComponent::GetFlySpeedCache ( ) const
inline

◆ GetMaxAcceleration()

float UProjectXVehicleMovementComponent::GetMaxAcceleration ( ) const
overridevirtual

◆ GetMaxSpeed()

float UProjectXVehicleMovementComponent::GetMaxSpeed ( ) const
overrideprotectedvirtual

◆ GetPackedAcceleration()

FORCEINLINE uint8 UProjectXVehicleMovementComponent::GetPackedAcceleration ( ) const
inline

◆ GetPredictionData_Client()

FNetworkPredictionData_Client * UProjectXVehicleMovementComponent::GetPredictionData_Client ( ) const
overridevirtual

◆ IsGroundedInFlyingMode()

bool UProjectXVehicleMovementComponent::IsGroundedInFlyingMode ( ) const
inline

◆ PackAcceleration()

void UProjectXVehicleMovementComponent::PackAcceleration ( )
protected

◆ PhysicsRotation()

void UProjectXVehicleMovementComponent::PhysicsRotation ( float  DeltaTime)
overrideprotectedvirtual

◆ ShouldUpdateSimulationVisuals()

bool UProjectXVehicleMovementComponent::ShouldUpdateSimulationVisuals ( )
overrideprotectedvirtual

◆ TickComponent()

void UProjectXVehicleMovementComponent::TickComponent ( float  DeltaTime,
enum ELevelTick  TickType,
FActorComponentTickFunction *  ThisTickFunction 
)
overrideprotectedvirtual

◆ UpdateAltitudeLimitMultiplier()

void UProjectXVehicleMovementComponent::UpdateAltitudeLimitMultiplier ( float  NewAltitudeLimitMultiplier)

◆ UpdateFromCompressedFlags()

void UProjectXVehicleMovementComponent::UpdateFromCompressedFlags ( uint8  Flags)
overrideprotectedvirtual

Friends And Related Function Documentation

◆ AProjectXVehicle

friend class AProjectXVehicle
friend

Member Data Documentation

◆ AccelerationUnlessZero

FVector UProjectXVehicleMovementComponent::AccelerationUnlessZero
protected

◆ AccumulatedRotationRate

float UProjectXVehicleMovementComponent::AccumulatedRotationRate = 0.f
protected

◆ bBoostWhileFalling

bool UProjectXVehicleMovementComponent::bBoostWhileFalling = false
protected

◆ bIsGroundedInFlyingMode

bool UProjectXVehicleMovementComponent::bIsGroundedInFlyingMode = false
protected

◆ BlockedComponent

UPrimitiveComponent* UProjectXVehicleMovementComponent::BlockedComponent = NULL
protected

◆ bRightInputIsSteering

bool UProjectXVehicleMovementComponent::bRightInputIsSteering = false

◆ bUseCustomCollisionShapes

bool UProjectXVehicleMovementComponent::bUseCustomCollisionShapes = false
protected

◆ bWantsSteerLeft

uint8 UProjectXVehicleMovementComponent::bWantsSteerLeft

◆ bWantsSteerRight

uint8 UProjectXVehicleMovementComponent::bWantsSteerRight

◆ bWantsToBoost

uint8 UProjectXVehicleMovementComponent::bWantsToBoost

◆ bWantsToBoostUpwards

uint8 UProjectXVehicleMovementComponent::bWantsToBoostUpwards

◆ CollisionComponents

TArray<UPrimitiveComponent*> UProjectXVehicleMovementComponent::CollisionComponents
protected

◆ FlightDownwardsMultiplier

float UProjectXVehicleMovementComponent::FlightDownwardsMultiplier = 2.0f

◆ FloorNormalAngle

FVector UProjectXVehicleMovementComponent::FloorNormalAngle
protected

◆ FluidFrictionOverride

float UProjectXVehicleMovementComponent::FluidFrictionOverride = 0.0f
protected

◆ FlySpeedCache

float UProjectXVehicleMovementComponent::FlySpeedCache = INDEX_NONE
protected

◆ ForwardAirControl

float UProjectXVehicleMovementComponent::ForwardAirControl = 1.0f
protected

◆ GravityFallDetectionDistance

float UProjectXVehicleMovementComponent::GravityFallDetectionDistance = 300.0f

If gravity in flying mode is checked, this is the distance to trace down beyond the capsule to check for ground. If this check fails, the vehicle enters falling mode. This value is also used for knowing if flying vehicles are near the ground or not.

◆ LateralAirControl

float UProjectXVehicleMovementComponent::LateralAirControl = 1.0f
protected

◆ LinearVelocityLocal

FVector UProjectXVehicleMovementComponent::LinearVelocityLocal = FVector::ZeroVector
protected

◆ PackedAcceleration

uint8 UProjectXVehicleMovementComponent::PackedAcceleration = 0
protected

◆ RotationSpeed

float UProjectXVehicleMovementComponent::RotationSpeed
protected

◆ SmoothRotationRate

float UProjectXVehicleMovementComponent::SmoothRotationRate = 4.f
protected

◆ SteeringRate

float UProjectXVehicleMovementComponent::SteeringRate = 100.0f

◆ TargetRotation

FRotator UProjectXVehicleMovementComponent::TargetRotation
protected

◆ UpwardsBoostForce

float UProjectXVehicleMovementComponent::UpwardsBoostForce = 4000.f
protected

◆ UpwardsBoostMaxZ

float UProjectXVehicleMovementComponent::UpwardsBoostMaxZ = 2000.f
protected

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