Get Velocity¶
At a glance
Lives in: Blueprint API / Utilities / Transformation; implemented on
Actor and inherited by Pawn and Character ·
Returns: Vector in world-space centimeters per second - never None ·
Fails by: returning a zero vector when the actor has no velocity source;
calling it on a None target is the usual Blueprint Accessed None problem ·
Official docs: AActor,
Vector Length XY,
and How to Get Animation Variables
The one-minute version¶
Get Velocityreturns how fast and in what world direction an Actor is moving right now.- The return value is a
Vector, not a speed number.X,Y, andZare movement along world axes, measured in Unreal units per second. In Unreal, one unit is usually one centimeter. - For a normal
Character, the value usually comes from the Character Movement Component. For a physics actor, it can come from the physics body. - For animation ground speed, use
Vector Length XY, not fullVector Length. XY ignores vertical jumping/falling speed. - It can be
(0, 0, 0)even when something appears to move, especially if you move an actor by directly setting/teleporting transforms without a Movement Component or physics updating velocity.
What it actually does¶
Get Velocity is an Actor-level question. In Blueprint you can call it on a
Character because every Character is also a Pawn, and every Pawn is also an
Actor. That class ladder is covered in
The gameplay class hierarchy.
The node asks the target actor for its current world velocity:
pseudocode of the engine's behavior - not engine source
function GetVelocity(Actor):
if Actor's root component is simulating physics:
return root component physics velocity
if Actor has a MovementComponent that reports velocity:
return MovementComponent.Velocity
return (0, 0, 0)
For a first-person or third-person Character, the important part is usually the Movement Component. That component is what turns input, acceleration, braking, falling, walking, swimming, flying, and network movement into a current velocity value.
The return vector is world-space:
- positive/negative
Xmeans movement along the world's X axis, - positive/negative
Ymeans movement along the world's Y axis, - positive/negative
Zmeans upward or downward movement.
The vector is not "forward speed." If your character turns around, the same world velocity can point a different direction relative to the character's facing. If you need directional locomotion, calculate speed plus direction, not just speed.
When it returns zero (and what failure does)¶
Get Velocity does not return None. The suspicious value is a zero vector:
(0, 0, 0).
Common causes:
- The actor is actually stationary. Rotating in place, playing an idle animation, or moving only bones inside the mesh does not mean the Actor is changing world location.
- There is no Movement Component and no physics velocity. A plain Actor moved by custom transform code may not have a velocity source for this node.
- You teleported or set location manually. A teleport changes position but is not the same as movement over time. If your system moves actors this way, calculate velocity yourself from previous location and delta time.
- You are checking too early. Before BeginPlay, possession, or movement component updates, velocity can still be zero.
- Your target reference is
None. The function call is then the problem, not the velocity result. Guard cached references with Is Valid.
Failure has no hidden branch. The node does not start movement, ask input whether keys are pressed, wake physics, or create a Movement Component. It just returns the velocity the actor currently reports.
The pattern everyone actually uses¶
For the founding Animation Blueprint chain:
Event Blueprint Initialize Animation ->
Try Get Pawn Owner -> Cast To X ->
store OwnerCharacter.
Event Blueprint Update Animation ->
Is Valid (OwnerCharacter) ->
Get Velocity -> Vector Length XY ->
set GroundSpeed.
That GroundSpeed float then drives a BlendSpace or transition rule:
GroundSpeed <= small threshold: idle,GroundSpeed > walk threshold: walk/run blend,IsFalling: jump/fall state takes over.
The C++ twin, for the curious (our own example code):
void UHeroAnimInstance::NativeUpdateAnimation(float DeltaSeconds)
{
Super::NativeUpdateAnimation(DeltaSeconds);
if (!IsValid(OwnerCharacter))
{
GroundSpeed = 0.0f;
return;
}
const FVector Velocity = OwnerCharacter->GetVelocity();
GroundSpeed = Velocity.Size2D();
}
Ground speed vs 3D speed¶
Velocity is a direction plus magnitude. Animation often wants only the magnitude.
| Value | Blueprint nodes | What it includes | Use for |
|---|---|---|---|
| 3D speed | Get Velocity -> Vector Length |
X, Y, and Z | Flying, swimming, projectiles, full 3D movement. |
| Ground speed | Get Velocity -> Vector Length XY |
X and Y only | Walking/running BlendSpaces on a flat ground plane. |
| Vertical speed | Get Velocity -> break vector -> Z |
Z only | Jump rise/fall logic, landing prediction, fall animations. |
Most beginner character locomotion wants ground speed. If you use full 3D speed, jumping or falling can make the character appear to "run faster" in the BlendSpace because downward velocity is being counted as movement speed.
Lookalikes - which one do I want?¶
| Node | Returns | Use when |
|---|---|---|
| Get Velocity | Actor velocity as a world-space vector | You need how the whole actor is moving. |
| Vector Length XY | Float length of X/Y components | You need ground speed for locomotion animation. |
| Vector Length | Float length of X/Y/Z | You need total 3D speed. |
| Get Physics Linear Velocity | Velocity of a physics body or bone | You need a specific physics component/body, not actor movement. |
| Get Current Acceleration | Movement input/acceleration from Character Movement | You need to know whether the character is trying to move, not whether it is already moving. |
| Get Last Movement Input Vector | Last consumed input direction | You need input direction, not actual velocity. |
Rule of thumb: velocity is actual movement, acceleration/input is intent to move, and speed is velocity turned into a number.
Going deeper¶
- Event Blueprint Update Animation - where the beginner AnimBP pattern reads velocity each update.
- Try Get Pawn Owner - how an AnimBP gets the pawn or character whose velocity it reads.
- Possession - why input only moves the pawn that a controller possesses.
- Official docs: How to Get Animation Variables, UMovementComponent::UpdateComponentVelocity, and Get Physics Linear Velocity.
- Engine source (requires engine access - we do not reproduce it here):
AActor::GetVelocityinEngine/Source/Runtime/Engine/Private/Actor.cpp, andUMovementComponent::UpdateComponentVelocityinEngine/Source/Runtime/Engine/Private/Components/MovementComponent.cpp.