Scripting/Squirrel/Functions/Object.Rotation: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "Read-only rotation property of an object. ==Syntax== <pre> object.Rotation </pre> object.Rotation is an Quaternion so you can use : <pre> object.Rotation.x </pre> <pre> obje...")
 
mNo edit summary
Line 16: Line 16:


==Notes==
==Notes==
To rotate a object use [[Scripting/Squirrel/Functions/Object.RotateTo|RotateTo]] or [[http://wiki.vc-mp.org/index.php?title=Scripting/Squirrel/Functions/Object.RotateToEuler|RotateToEuler]] methods.
To rotate a object use [[Scripting/Squirrel/Functions/Object.RotateTo|RotateTo]] or [[Scripting/Squirrel/Functions/Object.RotateToEuler|RotateToEuler]] methods.





Revision as of 11:26, 2 June 2019

Read-only rotation property of an object.

Syntax

 object.Rotation 

object.Rotation is an Quaternion so you can use :

 object.Rotation.x 
 object.Rotation.y 
 object.Rotation.z 
 object.Rotation.w 

Since it is read-only you cannot use

object.Rotation = Quaternion(0,0,0,1) // <-- read only, the thrown error is: Error: Member Variable not found.

for example.

Example

 Message(FindObject(1).Rotation() 

Notes

To rotate a object use RotateTo or RotateToEuler methods.


Related Functions