Entity::getVelocity

From RAGE Multiplayer Wiki
Revision as of 11:36, 30 November 2017 by Unknown (talk | contribs)

Get the velocity of the Entity

Syntax

entity.getVelocity();

Return value

  • Object Vector3

Example

let vehicle = mp.players.local.vehicle

let velocity = vehicle.getVelocity(); // returns a object with x, y , z

vehicle.setVelocity(velocity.x, velocity.y, velocity.z) // setting the velocity which we got.

See also