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
(Created page with "{{Scripting/Needs_Text}} == Syntax == <pre>Quaternion( X, Y, Z, W )</pre> == Arguments == * ''float'' '''X''' - Red * ''float'' '''Y''' - Green * ''float'' '''Z''' - Blue ...")
 
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Scripting/Needs_Text}}


== Syntax ==
== Syntax ==
Line 7: Line 6:
== Arguments ==
== Arguments ==


* ''float'' '''X''' - Red
* ''float'' '''X''' - X coordinate
* ''float'' '''Y''' - Green
* ''float'' '''Y''' - Y coordinate
* ''float'' '''Z''' - Blue
* ''float'' '''Z''' - Z coordinate
* ''float'' '''W''' - Blue
* ''float'' '''W''' - Rotation


== Example ==
== Example ==


{{Scripting/Needs_Example}}
<source lang="squirrel">function onPlayerCommand( player, cmd, passed )
{
    if ( cmd == "resetangles" )
    {
          player.Angle = Quaternion(0, 0, 0, 0);
    }
}</source>
 
== Description ==
 
Quaternion is used to locate fourth dimensional points
 


=== Notes ===
=== Notes ===
Prefer to use Vector as it is easier




Line 22: Line 34:


{{Scripting/Squirrel/Functions/Data Structures}}
{{Scripting/Squirrel/Functions/Data Structures}}
[[Category:Scripting/Squirrel/Functions/Data_Structures]]

Latest revision as of 18:01, 30 January 2017

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);
     }
}

Description

Quaternion is used to locate fourth dimensional points


Notes

Prefer to use Vector as it is easier


Related Functions