Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UPrimitiveComponent
Description
Set the angular velocity of a single body. This should be used cautiously - it may be better to use AddTorque or AddImpulse.
| Name | SetPhysicsAngularVelocityInRadians |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Components/PrimitiveComponent.h |
| Include Path | #include "Components/PrimitiveComponent.h" |
| Source | /Engine/Source/Runtime/Engine/Private/PrimitiveComponentPhysics.cpp |
UFUNCTION (BlueprintCallable, Category="Physics", Meta=(UnsafeDuringActorConstruction="true"))
virtual void SetPhysicsAngularVelocityInRadians
(
FVector NewAngVel,
bool bAddToCurrent,
FName BoneName
)
Parameters
| Name | Remarks |
|---|---|
| NewAngVel | New angular velocity to apply to body, in radians per second. |
| bAddToCurrent | If true, NewAngVel is added to the existing angular velocity of the body. |
| BoneName | If a SkeletalMeshComponent, name of body to modify angular velocity of. 'None' indicates root body. |