Vehicle::rotation: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
m (Replaced HTML with template)
Line 9: Line 9:


== Example ==
== Example ==
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
{{ServersideCode|
<div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div>
<pre>
<syntaxhighlight lang="javascript">
let rotation = vehicle.rotation;
let rotation = vehicle.rotation;
vehicle.rotation = new mp.Vector3(0, 0, 90);
vehicle.rotation = new mp.Vector3(0, 0, 90);
console.log(vehicle.rotation.x, vehicle.rotation.y, vehicle.rotation.z);
console.log(vehicle.rotation.x, vehicle.rotation.y, vehicle.rotation.z);
</syntaxhighlight>
</pre>
</div>
}}


==See Also==
==See Also==
{{Entity_block}}
{{Entity_block}}

Revision as of 11:42, 26 October 2018

This property using for getting or setting vehicle rotation.

Getter

  • Vector3

Setter

  • Vector3

Example

Server-Side
let rotation = vehicle.rotation;
vehicle.rotation = new mp.Vector3(0, 0, 90);
console.log(vehicle.rotation.x, vehicle.rotation.y, vehicle.rotation.z);

See Also