Vehicle::velocity: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "This property using for getting or setting vehicle velocity. '''Note: this property is read-only.''' == Example == <source lang="javascript"> let velocity = vehicle.velocity...")
 
m (Replaced HTML with template)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This property using for getting or setting vehicle velocity.
This property using for getting vehicle velocity.


'''Note: this property is read-only.'''
==Getter==
* '''<span style="color:#008017">Vector3</span>'''
== Example ==
== Example ==
<source lang="javascript">
{{ServersideCode|
let velocity = vehicle.velocity
<pre>
vehicle.velocity = new mp.Vector3(0.2, 0.3, 0.4)
let velocity = vehicle.velocity;
</source>
console.log(`velocityX: ${velocity.x} | velocityY: ${velocity.y} | velocityZ: ${velocity.z}`);
</pre>
}}
==See Also==
{{Vehicle_definition}}

Latest revision as of 11:44, 26 October 2018