Adventure Kit  4.16
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
UAdvKitCharacterMovementComponent Class Reference

Default movement component for the. More...

#include <AdvKitCharacterMovementComponent.h>

Inheritance diagram for UAdvKitCharacterMovementComponent:
UAdvKitGravityCharacterMovementComponent

Public Member Functions

virtual class FNetworkPredictionData_Client * GetPredictionData_Client () const override
 
 UAdvKitCharacterMovementComponent (const FObjectInitializer &ObjectInitializer)
 
void SetMovementVariables (FVector NewVelocity, FVector NewAcceleration)
 
void ZeroMovementVariables ()
 
FORCEINLINE const FAdvKitMovementPropertiesGetAdvMovementProperties () const
 
FORCEINLINE FAdvKitMovementPropertiesGetAdvMovementProperties ()
 
virtual void SetAdvMovementMode (EAdvKitMovementMode NewMovementMode, uint8 NewCustomMode=0)
 
virtual bool IsClimbingWall () const
 
virtual bool IsClimbingCeiling () const
 
virtual bool IsClimbingLedge () const
 
virtual bool IsClimbingLadder () const
 
virtual bool IsWalkingTightspace () const
 
virtual bool IsWalkingBalance () const
 
virtual bool LetGoOfZone ()
 
virtual bool JumpUpZone ()
 
virtual bool TryToTransition (AAdvKitZone *ForZone, const FVector &ForWorldPosition, const FVector &InWorldDirection=FVector::ZeroVector, bool bIsJump=false)
 
virtual UAdvKitTransitionComponentGetPossibleTransition (AAdvKitZone *ForZone, const FVector &ForWorldPosition, const FVector &InWorldDirection=FVector::ZeroVector, bool bIsJump=false)
 
virtual bool CanTransition (AAdvKitZone *ForZone, const FVector &ForWorldPosition, const FVector &InWorldDirection=FVector::ZeroVector, bool bIsJump=false)
 
virtual EAdvKitMovementMode GetAdvMovementMode () const
 
uint8 GetAdvCustomMovementMode () const
 
virtual void TickComponent (float DeltaSeconds, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override
 
virtual float GetMaxSpeed () const override
 
virtual void SetUpdatedComponent (USceneComponent *NewUpdatedComponent) override
 
virtual void StartNewPhysics (float DeltaSeconds, int32 Iterations) override
 
virtual void PhysSwimming (float DeltaSeconds, int32 Iterations) override
 
virtual void PhysicsRotation (float DeltaSeconds) override
 
virtual void OnMovementUpdated (float DeltaSeconds, const FVector &OldLocation, const FVector &OldVelocity) override
 
virtual void ChangeTargetBalance ()
 
virtual class AAdvKitZoneGetZone ()
 
virtual FVector GetZoneLocation ()
 
virtual bool MoveLocationInZone (FVector GlobalAcceleration, float DeltaSeconds, const FVector &HalfExtent, bool bAutoTransition=true, bool ConstrainAcceleration=true)
 
virtual bool PhysMoveInZone (FVector GlobalAcceleration, FVector WorldOffset, float DeltaSeconds, const FVector &HalfExtent, bool bAutoTransition=true, bool ConstrainAcceleration=true)
 
virtual void PhysZoneMoving (float DeltaSeconds, int32 Iterations)
 
virtual FRotator GetDesiredRotationInZone (AAdvKitZone *Zone, FVector AtLocation)
 
virtual FRotator GetDesiredRotationInZoneNew (AAdvKitZone *Zone, const FVector &AtZoneLocation)
 
virtual FVector GetDesiredOffsetFromZone (AAdvKitZone *Zone, FVector AtLocation)
 
FVector GetDesiredOffsetFromZoneNew (AAdvKitZone *Zone, const FVector &AtZoneLocation)
 
virtual FVector GetHalfExtentForZone (AAdvKitZone *Zone)
 
 UFUNCTION (BlueprintCallable, Category="AdvKit", meta=(DeprecatedFunction, DeprecationMessage="This function is deprecated, please use GetZone()->GetZoneLocationWorld instead.")) virtual FVector GetGlobalLocationInZone()
 
void AccumulateRootMotion (FVector MovementDelta, FRotator NewRotation)
 
void AccumulateRootMotionRotation (FRotator NewRotation)
 
void AddRootMotionMovement (FVector GlobalDelta)
 
void AddRootMotionRotation (FRotator AdditionalRotation)
 

Public Attributes

FVector LastNonZeroAcceleration
 
FVector LocalZoneLocation
 
FAdvKitMovementProperties AdvMovementProps
 
float JumpDistanceLedgeLadderHorizontal
 
float LedgePrecognitionDistance_DEPRECATED
 
float LedgeDownTraceDistance_DEPRECATED
 
float LedgeSmallHeightOffset_DEPRECATED
 
float LedgeJumpDistanceVertical
 
float LedgeJumpDistanceHorizontal
 
float LedgeJumpDistanceBack
 
float MaxLedgeClimbSpeed
 
FVector LedgeOffset
 
float LadderJumpDistanceHorizontal
 
float LadderJumpDistanceBack
 
float MaxLadderClimbSpeed
 
FVector LadderOffset
 
FVector WallOffset
 
float MaxWallClimbSpeed
 
float MaxCeilingClimbSpeed
 
FVector CeilingOffset
 
float CeilingMinTransitionDot
 
FVector TightSpaceOffset
 
float MaxTightSpaceWalkSpeed
 
float MaxBalanceWalkSpeed
 
FVector BalanceOffset
 
float BalanceRotationRate
 
float CurrentBalance
 
float CounterBalanceMultiplier
 
float MinCounterBalanceDot
 
float MaxBalanceTurnAroundDot
 
float BalanceChangePerSecond
 
float MinBalanceChangePerSecond
 
float MaxBalanceChangePerSecond
 
float MaxBalance
 
float BalanceChangeTime
 
FTimerHandle ChangeBalanceTimerHandle
 
float SwimmingImmersionDepthFlat
 
float SwimmingImmersionDepthUpright
 
float SwimmingSurfaceMultiplier
 
float DivingToSwimmingImmersionDepth
 
float MaxUprightSwimSpeed
 

Protected Member Functions

virtual void PhysActionDriven (float DeltaSeconds, int32 Iterations)
 

Protected Attributes

class AAdvKitCharacterAdvKitCharacterOwner
 

Friends

class FSavedMove_AdvKitCharacter
 

Detailed Description

Default movement component for the.

See also
AAdvKitCharacter. This handles zone movement and target locking.

Constructor & Destructor Documentation

UAdvKitCharacterMovementComponent::UAdvKitCharacterMovementComponent ( const FObjectInitializer &  ObjectInitializer)

Constructor

Member Function Documentation

void UAdvKitCharacterMovementComponent::AccumulateRootMotion ( FVector  MovementDelta,
FRotator  NewRotation 
)

Adds root motion to the owning character.

Parameters
MovementDeltaTranslation to be added to the character.
NewRotationNew rotation the character should have.
void UAdvKitCharacterMovementComponent::AccumulateRootMotionRotation ( FRotator  NewRotation)

Adds root motion rotation to the owning character.

Parameters
NewRotationNew rotation the character should have.
void UAdvKitCharacterMovementComponent::AddRootMotionMovement ( FVector  GlobalDelta)

Adds root motion to the owning character.

Parameters
GlobalDeltaTranslation to be added to the character.
void UAdvKitCharacterMovementComponent::AddRootMotionRotation ( FRotator  AdditionalRotation)

Adds root motion rotation to the owning character.

Parameters
AdditionalRotationRotation do be added to the character.
bool UAdvKitCharacterMovementComponent::CanTransition ( AAdvKitZone ForZone,
const FVector &  ForWorldPosition,
const FVector &  InWorldDirection = FVector::ZeroVector,
bool  bIsJump = false 
)
virtual

Checks if the character can use a transition in a given zone

Parameters
ForZoneZone to start transition in
ForWorldPositionWhere to start the transition
InWorldDirectionThe direction the player wants to transition in
bIsJumpTrue if the character attempts to jump during the transition
Returns
True if the character can transition with the provided arguments
void UAdvKitCharacterMovementComponent::ChangeTargetBalance ( )
virtual

Timer callback to change target balance

uint8 UAdvKitCharacterMovementComponent::GetAdvCustomMovementMode ( ) const

Get the current custom movement mode

Returns
Current custom movement mode
EAdvKitMovementMode UAdvKitCharacterMovementComponent::GetAdvMovementMode ( ) const
virtual

Get the current movement mode

Returns
Current movement mode
FORCEINLINE const FAdvKitMovementProperties* UAdvKitCharacterMovementComponent::GetAdvMovementProperties ( ) const
inline

Get the advkit movement properties

FORCEINLINE FAdvKitMovementProperties* UAdvKitCharacterMovementComponent::GetAdvMovementProperties ( )
inline

Get the advkit movement properties

FVector UAdvKitCharacterMovementComponent::GetDesiredOffsetFromZone ( AAdvKitZone Zone,
FVector  AtLocation 
)
virtual

Query how far the character should be away from the location inside the zone

Parameters
ZoneZone to get the desired offset from
AtLocationLocation inside the current zone
Returns
Desired offset from the location inside the zone
FVector UAdvKitCharacterMovementComponent::GetDesiredOffsetFromZoneNew ( AAdvKitZone Zone,
const FVector &  AtZoneLocation 
)

Query how far the character should be away from the location inside the zone

Parameters
ZoneZone to get the desired offset from
AtZoneLocationLocation inside the current zone
Returns
Desired offset from the location inside the zone
FRotator UAdvKitCharacterMovementComponent::GetDesiredRotationInZone ( AAdvKitZone Zone,
FVector  AtLocation 
)
virtual

Query what rotation the character should have at a specified location inside the current zone.

Parameters
ZoneZone to get the desired rotation
AtLocationLocation inside the current zone
Returns
Desired rotation of the character
FRotator UAdvKitCharacterMovementComponent::GetDesiredRotationInZoneNew ( AAdvKitZone Zone,
const FVector &  AtZoneLocation 
)
virtual

Query what rotation the character should have at a specified location inside the current zone.

Parameters
ZoneZone to get the desired rotation
AtZoneLocationLocation inside the current zone
Returns
Desired rotation of the character
FVector UAdvKitCharacterMovementComponent::GetHalfExtentForZone ( AAdvKitZone Zone)
virtual

Query how "big" the character for a specific movement mode in local space.

Parameters
ZoneZone to get extent for
Returns
Half extent of the character e.g (Radius, Radius, Capsule Half Height)
UAdvKitTransitionComponent * UAdvKitCharacterMovementComponent::GetPossibleTransition ( AAdvKitZone ForZone,
const FVector &  ForWorldPosition,
const FVector &  InWorldDirection = FVector::ZeroVector,
bool  bIsJump = false 
)
virtual

Queries all possible transitions a zone has for the character

Parameters
ForZoneZone to get transitions from
ForWorldPositionWhere to start the transition
InWorldDirectionThe direction the player wants to transition in
bIsJumpTrue if the character attempts to jump during the transition
Returns
List of possible transitions
class AAdvKitZone * UAdvKitCharacterMovementComponent::GetZone ( )
virtual

Query the current zone of the character

Returns
Zone the character is currently in
FVector UAdvKitCharacterMovementComponent::GetZoneLocation ( )
virtual

Get the current zone location of the character

Returns
Current zone location
bool UAdvKitCharacterMovementComponent::IsClimbingCeiling ( ) const
virtual
Returns
True if the character is currently climbing a ceiling.
bool UAdvKitCharacterMovementComponent::IsClimbingLadder ( ) const
virtual
Returns
True if the character is currently climbing a ladder.
bool UAdvKitCharacterMovementComponent::IsClimbingLedge ( ) const
virtual
Returns
True if the character is currently climbing a ledge.
bool UAdvKitCharacterMovementComponent::IsClimbingWall ( ) const
virtual
Returns
True if the character is currently climbing a wall.
bool UAdvKitCharacterMovementComponent::IsWalkingBalance ( ) const
virtual
Returns
True if the character is currently in a balance zone.
bool UAdvKitCharacterMovementComponent::IsWalkingTightspace ( ) const
virtual
Returns
True if the character is currently walking in a tight space.
bool UAdvKitCharacterMovementComponent::JumpUpZone ( )
virtual

Tries to transition upwards on a zone

Returns
True if a transition happened
bool UAdvKitCharacterMovementComponent::LetGoOfZone ( )
virtual

Tries to let go of a zone (transition downwards or leaving a wall)

Returns
True if a transition happened
bool UAdvKitCharacterMovementComponent::MoveLocationInZone ( FVector  GlobalAcceleration,
float  DeltaSeconds,
const FVector &  HalfExtent,
bool  bAutoTransition = true,
bool  ConstrainAcceleration = true 
)
virtual

Moves the character's zone location object with the given parameters

Parameters
GlobalAccelerationAcceleration to use for the intended moving direction
DeltaSecondsDelta time since last tick
HalfExtentSize of the character in the zone (e.g. FVector(Radius,Radius,HalfHeight))
bAutoTransitionTrue to try to transition if the character cannot move
ConstrainAccelerationTrue to restrict the acceleration vector to the zone
Returns
True if location was moved
void UAdvKitCharacterMovementComponent::PhysActionDriven ( float  DeltaSeconds,
int32  Iterations 
)
protectedvirtual

Delegates movement to the current action

Parameters
DeltaSecondsTime since last frame
IterationsPhysics iterations for sub stepping
bool UAdvKitCharacterMovementComponent::PhysMoveInZone ( FVector  GlobalAcceleration,
FVector  WorldOffset,
float  DeltaSeconds,
const FVector &  HalfExtent,
bool  bAutoTransition = true,
bool  ConstrainAcceleration = true 
)
virtual

Moves the character inside the current zone with the given parameters

Parameters
GlobalAccelerationAcceleration to use for the intended moving direction
DeltaSecondsDelta time since last tick
HalfExtentSize of the character in the zone (e.g. FVector(Radius,Radius,HalfHeight))
bAutoTransitionTrue to try to transition if the character cannot move
ConstrainAccelerationTrue to restrict the acceleration vector to the zone
Returns
True if location was moved
void UAdvKitCharacterMovementComponent::SetAdvMovementMode ( EAdvKitMovementMode  NewMovementMode,
uint8  NewCustomMode = 0 
)
virtual

Set a new movement mode

Parameters
NewMovementModeThe new movement mode to set
NewCustomModeA custom movement mode to set
void UAdvKitCharacterMovementComponent::SetMovementVariables ( FVector  NewVelocity,
FVector  NewAcceleration 
)

Hard set the velocity variables

Parameters
NewVelocityNew velocity in world space
NewAccelerationNew acceleration in world space
bool UAdvKitCharacterMovementComponent::TryToTransition ( AAdvKitZone ForZone,
const FVector &  ForWorldPosition,
const FVector &  InWorldDirection = FVector::ZeroVector,
bool  bIsJump = false 
)
virtual

Attempts to do a transition inside a zone to a given direction

Parameters
ForZoneZone to start transition in
ForWorldPositionWhere to start the transition
InWorldDirectionThe direction the player wants to transition in
bIsJumpTrue if the character attempts to jump during the transition
Returns
True if a transition happened
UAdvKitCharacterMovementComponent::UFUNCTION ( BlueprintCallable  ,
Category  = "AdvKit",
meta  = (DeprecatedFunction, DeprecationMessage="This function is deprecated, please use GetZone()->GetZoneLocationWorld instead.") 
)

Get the location inside the current zone in world space.

Returns
World space location inside the current zone
void UAdvKitCharacterMovementComponent::ZeroMovementVariables ( )

Set all movement variables to zero, halting movement

Member Data Documentation

class AAdvKitCharacter* UAdvKitCharacterMovementComponent::AdvKitCharacterOwner
protected

AdvKitCharacter movement component belongs to

FAdvKitMovementProperties UAdvKitCharacterMovementComponent::AdvMovementProps

Movement properties for the adventure kit

float UAdvKitCharacterMovementComponent::BalanceChangePerSecond

How fast to change the balance to the target balance

float UAdvKitCharacterMovementComponent::BalanceChangeTime

How fast to change the target balance

FTimerHandle UAdvKitCharacterMovementComponent::ChangeBalanceTimerHandle

TImer to change target balance

float UAdvKitCharacterMovementComponent::CounterBalanceMultiplier

Scale to apply to player input trying to restore balance

float UAdvKitCharacterMovementComponent::CurrentBalance

The balance the character has when in a balancing zone

float UAdvKitCharacterMovementComponent::JumpDistanceLedgeLadderHorizontal

How far the character can jump horizontally between ladder and ledge

float UAdvKitCharacterMovementComponent::LadderJumpDistanceBack

How far the character can jump back from a ladder to another

float UAdvKitCharacterMovementComponent::LadderJumpDistanceHorizontal

How far the character can jump horizontally from a ladder

FVector UAdvKitCharacterMovementComponent::LastNonZeroAcceleration

Keep track of last acceleration that was not zero in case the character needs to face this direction

float UAdvKitCharacterMovementComponent::LedgeDownTraceDistance_DEPRECATED

How far down to trace to consider a cliff for ledges

float UAdvKitCharacterMovementComponent::LedgeJumpDistanceBack

How far the character can jump back from a ledge

float UAdvKitCharacterMovementComponent::LedgeJumpDistanceHorizontal

How far the character can jump horizontally from a ledge

float UAdvKitCharacterMovementComponent::LedgeJumpDistanceVertical

How far the character can jump vertically from a ledge

FVector UAdvKitCharacterMovementComponent::LedgeOffset

What local offset to keep from a ledge while climbing it

float UAdvKitCharacterMovementComponent::LedgePrecognitionDistance_DEPRECATED

How far ahead to trace for a ledge below when walking

float UAdvKitCharacterMovementComponent::LedgeSmallHeightOffset_DEPRECATED

How far above the ground to start tracing

float UAdvKitCharacterMovementComponent::MaxBalanceChangePerSecond

How fast to change the balance to the target balance at maximum

float UAdvKitCharacterMovementComponent::MaxBalanceTurnAroundDot

How much the current forward and input directions need to differ in order for the character to turn around

float UAdvKitCharacterMovementComponent::MaxLedgeClimbSpeed

How fast the character can climb on a ledge

float UAdvKitCharacterMovementComponent::MinBalanceChangePerSecond

How fast to change the balance to the target balance at minimum

float UAdvKitCharacterMovementComponent::MinCounterBalanceDot

If input does not align correctly with balance direction, this is the min dot required for input to count as counter balance


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