UCharacterMovementComponent::AddForce

Add force to character.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/CharacterMovementComponent.h

Include

#include "GameFramework/CharacterMovementComponent.h"

Source

/Engine/Source/Runtime/Engine/Private/Components/CharacterMovementComponent.cpp

Syntax

virtual void AddForce
(
    FVector Force
)

Remarks

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.

that changing the momentum of characters like this can change the movement mode.

Parameters

Parameter

Description

Force

Force to apply.

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