UPrimitiveComponent::AddForceAtLocation

Add a force to a single rigid body at a particular location in world space.

Windows
MacOS
Linux

Override Hierarchy

UPrimitiveComponent::AddForceAtLocation()

UDestructibleComponent::AddForceAtLocation()

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Components/PrimitiveComponent.h

Include

#include "Components/PrimitiveComponent.h"

Source

/Engine/Source/Runtime/Engine/Private/PrimitiveComponentPhysics.cpp

Syntax

virtual void AddForceAtLocation
(
    FVector Force,
    FVector Location,
    FName BoneName
)

Remarks

Add a force to a single rigid body at a particular location in world space. This is like a 'thruster'. Good for adding a burst over some (non zero) time. Should be called every frame for the duration of the force.

Parameters

Parameter

Description

Force

Force vector to apply. Magnitude indicates strength of force.

Location

Location to apply force, in world space.

BoneName

If a SkeletalMeshComponent, name of body to apply force to. 'None' indicates root body.

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