Scripting/Squirrel/Functions/Object.Rotation

From Vice City Multiplayer
Revision as of 11:25, 2 June 2019 by NicusorN5 (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

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 [[1]] methods.


Related Functions