Character Movement

Character Movement

Windows
MacOS
Linux
On this page

Actions

Add Force

Add force to character. Forces are accumulated each tick and applied together so multiple calls to this function will accumulate. Forces are scaled depending on timestep, so they can be applied each frame. If you want an instantaneous force, use AddImpulse. Adding a force always takes the actor's mass into account. Note that changing the momentum of characters like this can change the movement mode.

Target is Character Movement Component

Add Impulse

Add impulse to character. Impulses are accumulated each tick and applied together so multiple calls to this function will accumulate. An impulse is an instantaneous force, usually applied once. If you want to continually apply forces each frame, use AddForce(). Note that changing the momentum of characters like this can change the movement mode.

Target is Character Movement Component

Calc Velocity

Updates Velocity and Acceleration based on the current state, applying the effects of friction and acceleration or deceleration. Does not apply gravity. This is used internally during movement updates. Normally you don't need to call this from outside code, but you might want to use it for custom movement modes.

Target is Character Movement Component

Clear Accumulated Forces

Clears forces accumulated through AddImpulse() and AddForce(), and also pending launch velocity.

Target is Character Movement Component

ComputeFloorDistance

Compute distance to the floor from bottom sphere of capsule and store the result in FloorResult. This distance is the swept distance of the capsule to the first point impacted by the lower hemisphere, or distance from the bottom of the capsule in the case of a line trace. This function does not care if collision is disabled on the capsule (unlike FindFloor).

Target is Character Movement Component

Disable Movement

Make movement impossible (sets movement mode to MOVE_None).

Target is Character Movement Component

FindFloor

Sweeps a vertical trace to find the floor for the capsule at the given location. Will attempt to perch if ShouldComputePerchResult() returns true for the downward sweep result. No floor will be found if collision is disabled on the capsule!

Target is Character Movement Component

Get Analog Input Modifier

Returns modifier [0..1] based on the magnitude of the last input vector, which is used to modify the acceleration and max speed during movement.

Target is Character Movement Component

Get Character Owner

Get the Character that owns UpdatedComponent.

Target is Character Movement Component

Get Current Acceleration

Returns current acceleration, computed from input vector each update.

Target is Character Movement Component

Get Imparted Movement Base Velocity

If we have a movement base, get the velocity that should be imparted by that base, usually when jumping off of it. Only applies the components of the velocity enabled by bImpartBaseVelocityX, bImpartBaseVelocityY, bImpartBaseVelocityZ.

Target is Character Movement Component

Get Last Update Location

Returns the location at the end of the last tick.

Target is Character Movement Component

Get Last Update Rotation

Returns the rotation at the end of the last tick.

Target is Character Movement Component

Get Last Update Velocity

Returns the velocity at the end of the last tick.

Target is Character Movement Component

Get Max Acceleration

Returns maximum acceleration for the current state.

Target is Character Movement Component

Get Max Braking Deceleration

Returns maximum deceleration for the current state when braking (ie when there is no acceleration).

Target is Character Movement Component

Get Max Jump Height

Compute the max jump height based on the JumpZVelocity velocity and gravity. This does not take into account the CharacterOwner's MaxJumpHoldTime.

Target is Character Movement Component

Get Max Jump Height with Jump Time

Compute the max jump height based on the JumpZVelocity velocity and gravity. This does take into account the CharacterOwner's MaxJumpHoldTime.

Target is Character Movement Component

Get Min Analog Speed

Returns maximum acceleration for the current state.

Target is Character Movement Component

Get Movement Base

Return PrimitiveComponent we are based on (standing and walking on).

Target is Character Movement Component

Get Perch Radius Threshold

Returns The distance from the edge of the capsule within which we don't allow the character to perch on the edge of a surface.

Target is Character Movement Component

Get Valid Perch Radius

Returns the radius within which we can stand on the edge of a surface without falling (if this is a walkable surface). Simply computed as the capsule radius minus the result of GetPerchRadiusThreshold().

Target is Character Movement Component

GetWalkableFloorAngle

Get the max angle in degrees of a walkable surface for the character.

Target is Character Movement Component

GetWalkableFloorZ

Get the Z component of the normal of the steepest walkable surface for the character. Any lower than this and it is not walkable.

Target is Character Movement Component

Is Walkable

Return true if the hit result should be considered a walkable surface for the character.

Target is Character Movement Component

Is Walking

Returns true if the character is in the 'Walking' movement mode.

Target is Character Movement Component

Set Avoidance Enabled

Change avoidance state and registers in RVO manager if needed

Target is Character Movement Component

Set Avoidance Group Mask

Set Avoidance Group Mask

Target is Character Movement Component

Set Groups to Avoid Mask

Set Groups to Avoid Mask

Target is Character Movement Component

Set Groups to Ignore Mask

Set Groups to Ignore Mask

Target is Character Movement Component

Set Movement Mode

Change movement mode.

Target is Character Movement Component

Set Walkable Floor Angle

Set the max angle in degrees of a walkable surface for the character. Also computes WalkableFloorZ.

Target is Character Movement Component

Set Walkable Floor Z

Set the Z component of the normal of the steepest walkable surface for the character. Also computes WalkableFloorAngle.

Target is Character Movement Component

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