Vehicle.Velocity
From Liberty Unleashed Wiki
This Vehicle class member returns the velocity of the given vehicle.
Syntax
Vector Vehicle.Velocity
Arguments
- Velocity - This is the changed velocity for the vehicle as a Vector
Example
function getVelocityX( ) { local vehicle = FindVehicle( 1 ); local velocity = veh.Velocity; local velocityX = velocity.x; return velocityX; }
This code will return the velocity of vehicle 1 along the X axis.
Notes
The function FindVehicle was used in this example. More information is available on the corresponding page.
Related Functions
- FindVehicle
- GetVehicleIDFromName
- GetVehicleName
- Vehicle.Airborne
- Vehicle.Angle
- Vehicle.Colour1
- Vehicle.Colour2
- Vehicle.Driver
- Vehicle.EngineDamage
- Vehicle.EngineState
- Vehicle.Gear
- Vehicle.GetAddon
- Vehicle.Health
- Vehicle.ID
- Vehicle.LightState
- Vehicle.Locked
- Vehicle.Model
- Vehicle.Pos
- Vehicle.Radio
- Vehicle.Siren
- Vehicle.Velocity
- Vehicle.VirtualWorld
- Vehicle.Wrecked