Garry's Mod Wiki

CMoveData:GetVelocity

  Vector CMoveData:GetVelocity()

Description

Gets the players velocity.

This will return Vector(0,0,0) sometimes when walking on props.

Issue Tracker: 3413

Returns

1 Vector
The players velocity

Example

Prints the player's velocity.

function GM:Move( ply, movedata ) print( movedata:GetVelocity() ) end