{ }Blueprint → C++

Unreal Engine 5 · Blueprint → C++

Set Physics Linear Velocity in Unreal Engine 5 C++UE Docs

The Set Physics Linear Velocity node is UPrimitiveComponent::SetPhysicsLinearVelocity. Call MyMesh->SetPhysicsLinearVelocity(FVector(0,0,500)); to set the body's velocity in cm/s directly.

Blueprint node & C++ equivalent

C++
MyMesh->SetPhysicsLinearVelocity(FVector(0.f, 0.f, 500.f));

What does the Set Physics Linear Velocity node do?

Set Physics Linear Velocity overwrites the linear velocity of a simulating physics body, ignoring its mass and current momentum. Unlike forces and impulses, which add to existing motion, this sets the velocity outright in centimeters per second.

In C++ it is the SetPhysicsLinearVelocity function on UPrimitiveComponent.

The C++ equivalent

The call MyMesh->SetPhysicsLinearVelocity(FVector(0.f, 0.f, 500.f)); makes the body move straight up at 500 cm/s, replacing whatever velocity it had. There is an optional second bAddToCurrent parameter; when true, the vector is added to the existing velocity instead of replacing it.

The component must be simulating physics, otherwise the call has no effect because there is no physics body to drive.

When to use it in C++

Use this when you need precise control over speed, such as setting a projectile's exact launch velocity or zeroing out motion by passing FVector::ZeroVector. It is more deterministic than impulses because the result does not depend on the body's mass.

Frequently asked questions

How is SetPhysicsLinearVelocity different from AddImpulse in UE5?+

SetPhysicsLinearVelocity replaces the body's velocity outright and ignores mass, while AddImpulse adds momentum and can be scaled by mass. Use the velocity setter when you want an exact speed.

How do I stop a physics object in Unreal Engine 5 C++?+

Call MyMesh->SetPhysicsLinearVelocity(FVector::ZeroVector); to clear linear velocity, and also SetPhysicsAngularVelocityInDegrees to zero to stop spinning.

Related Physics nodes

View all Physics nodes →