Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UPhysicsThreadLibrary
Description
Add a force to a single rigid body. 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.
| Name | AddForce |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Public/Physics/Experimental/PhysicsThreadLibrary.h |
| Include Path | #include "Physics/Experimental/PhysicsThreadLibrary.h" |
UFUNCTION (BlueprintCallable, Category="Utilities")
static void AddForce
(
FBodyInstanceAsyncPhysicsTickHandle Handle,
FVector Force,
bool bAccelChange
)
Parameters
| Name | Remarks |
|---|---|
| Force | Force vector to apply. Magnitude indicates strength of force. |
| bAccelChange | If true, Force is taken as a change in acceleration instead of a physical force (i.e. mass will have no effect). |