BP_WalkingComponent

This page describes the Walking Component that ships with Motion. The Walking Component provides camera movement for basic player movement and configurable walking acceleration.

Dependencies

  • requires BP_JumpingComponent.

  • requires BP_SprintingComponent.

  • requires BP_CrouchingComponent.

Methods

Event Handler

NameDescription

HandleOnCurveMaximum

Called when the component's active curve reaches its peak.

HandleOnEventBeginPlay

Called when "Event Begin Play" gets called. Sets up events and saves component references.

HandleOnEventTick

Core logic handling. See detailed comments.

HandleOnPlayerLanded

Called when the player lands.

HandleOnVelocityBegin

Called when player starts moving.

HandleOnVelocityStop

Called when player stops moving.

Manipulators

NameDescription

LerpTorwardsWalkingSpeed

Applies the current walking speed, relative to curve progression.

ResetWalkAccelerationSeconds

Resets walk acceleration, e.g. after stopping to walk

UpdateDeltaSeconds

Updates progress on sprint shake camera curve, timer for holding the key down & penalty timer if penalized

Debug

NameDescription

PrintDebugInformation

Prints useful information on the screen. Helpful for debugging.


Variables

Configuration

NameDescription

PostLandingAccelerationCurve

The curve vector used to accelerate when landing.

WalkAccelerationCurve

The curve vector used to accelerate when walking.

WalkShakeCurve

The curve vector used to move the camera when walking.

bUseLandingAcceleration

If true, uses LandingAccelerationCurve instead of WalkAccelerationCurve when landing.

bUseWalkAcceleration

If true, uses WalkAccelerationCurve to accelerate the player instead of instantly setting the BaseMaxWalkSpeed.

bShowDebugInformation

If ticked, various useful variables will be printed on the screen to help with debugging

bIsEnabled

If unticked, the component will only print debug data and not update any other values.

Constants

NameDescription

CurveType

Type Identifier for the curves created by this component.

Component Data

NameDescription

ActiveAccelerationCurve

The currently used acceleration curve.

CurrentTargetRotation

The current requested camera offset for this compoenent

States

NameDescription

bHasLandedWithOverride

If true, the player is sprinting

bIsWalking

If true, the player is sprinting

Default

NameDescription

JumpingComponent

Reference to the sprint component

SprintingComponent

Reference to the sprint component

CrouchComponent

Reference to the crouch component

Last updated