Scripting/Squirrel/Functions/Quaternion: 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
No edit summary
No edit summary
Line 14: Line 14:
== Example ==
== Example ==


{{Scripting/Needs_Example}}
<source lang="squirrel">function onPlayerCommand( player, cmd, passed )
{
    if ( cmd == "resetangles" )
    {
          player.Angle = Quaternion(0, 0, 0, 0);
    }
}</source>


=== Notes ===
=== Notes ===
Quaternion is used for locating fourth dimensional points





Revision as of 05:25, 22 February 2015


This page needs a description, or needs a better one. Please help us complete the wiki by writing one.


Syntax

Quaternion( X, Y, Z, W )

Arguments

  • float X - X coordinate
  • float Y - Y coordinate
  • float Z - Z coordinate
  • float W - Rotation

Example

function onPlayerCommand( player, cmd, passed )
{
     if ( cmd == "resetangles" )
     {
          player.Angle = Quaternion(0, 0, 0, 0);
     }
}

Notes

Quaternion is used for locating fourth dimensional points


Related Functions