UPrimitiveComponent::SetPhysicsLinearVelocity

Set the linear velocity of a single body.

Windows
MacOS
Linux

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 SetPhysicsLinearVelocity
(
    FVector NewVel,
    bool bAddToCurrent,
    FName BoneName
)

Remarks

Set the linear velocity of a single body. This should be used cautiously - it may be better to use AddForce or AddImpulse.

Parameters

Parameter

Description

NewVel

New linear velocity to apply to physics.

bAddToCurrent

If true, NewVel is added to the existing velocity of the body.

BoneName

If a SkeletalMeshComponent, name of body to modify velocity of. '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