Custom Maps & Logic
  • Custom Map Tutorial
    • Custom Map Introduction
    • Your first map
    • Map Navigation
    • Object Selection
    • Object Positioning
    • Object Attributes
    • Shortcuts and Macros
    • Editor Settings
    • Built-in Components Common Errors
    • Map Performance
    • Custom Assets
      • Your first Asset Bundle
      • Asset Bundles in Map Editor
      • Asset Bundles in Game
      • Adding to Asset Bundles
      • Asset Bundle naming
  • Custom Logic Tutorial
    • Custom Logic Introduction
    • Your first script
    • Variables
    • Types
    • Variable Inspector
    • Expressions
    • Conditionals
    • Loops
    • Functions
    • Coroutines
    • Classes
    • Static Classes
    • Components
    • Extensions
    • Cutscenes
    • Static Objects
    • Networking
    • Commenting
  • Reference
    • Static Classes
      • Game
      • Network
      • Map
      • UI
      • Time
      • Convert
      • String
      • Input
      • Math
      • Random
      • Cutscene
      • Camera
      • RoomData
      • PersistentData
      • Json
      • Physics
    • Objects
      • Component
      • Object
      • Character
      • Human
      • Titan
      • Shifter
      • MapObject
      • Transform
      • Player
      • NetworkView
      • Color
      • Vector3
      • Quaternion
      • Dict
      • List
      • Range
      • LineCastHitResult
      • MapTargetable
      • Random
    • Callbacks
      • Main
      • Components
  • Examples
    • Gamemodes
      • Survive
      • Waves
      • Endless
      • Racing
      • Blade PVP
      • Thunderspear PVP
      • Titan Explode
      • Cranked
      • More Examples
    • Components
      • SupplyStation
      • Daylight
      • PointLight
      • Rigidbody
      • NavMeshObstacle
      • Cannon
      • Dummy
      • Wagon
      • Tag
      • KillRegion
      • DamageRegion
      • MovePingPong
      • RacingCheckpointRegion
      • RacingFinishRegion
      • TeleportRegion
      • Animal
      • SignalMover
      • SignalSender
      • More Examples
Powered by GitBook
On this page
  • Initialization
  • Fields
  • Static Fields
  • Static functions
  1. Reference
  2. Objects

Quaternion

Inherits from Object. Is a struct, meaning that assignments will create copies and comparisons will return true if all fields are equivalent.

Initialization

Quaternion takes four floats X, Y, Z and W as parameters when initializing. Example: quaternion = Quaternion(0.5, 0.5, 0.5, 0.5);

Fields

Field
Type
Readonly
Description

X

float

false

X value of the quaternion.

Y

float

false

Y value of the quaternion.

Z

float

false

Z value of the quaternion.

W

float

false

W value of the quaternion.

Euler

Vector3

true

Returns the euler angles of the quaternion as a Vector3.

Static Fields

Can be accessed by referencing Quaternion directly (example: Quaternion.Identity)

Field
Type
Description

Identity

Quaternion

Returns the identity quaternion (0,0,0,0).

Static functions

Function
Returns
Description

Lerp(a: Quaternion, b: Quaternion, t: float)

Quaternion

Returns a Quaternion lerped between a and b using scale t. T must be between 0 and 1.

LerpUnclamped(a: Quaternion, b: Quaternion, t: float)

Quaternion

Returns a Quaternion lerped between a and b using scale t. T can be outside 0 and 1.

Slerp(a: Quaternion, b: Quaternion, t: float)

Quaternion

Returns a Quaternion spherical lerped between a and b using scale t. T must be between 0 and 1.

SlerpUnclamped(a: Quaternion, b: Quaternion, t: float)

Quaternion

Returns a Quaternion spherical lserped between a and b using scale t. T can be outside 0 and 1.

FromEuler(v: Vector3)

Quaternion

Returns the Quaternion rotation from the given euler angles.

LookRotation(forward: Vector3, [optional] up: Vector3)

Quaternion

Returns the Quaternion rotation with the specified forward and (optional) up Vector.

FromToRotation(from: Vector3, to: Vector3)

Quaternion

Returns the Quaternion rotation between the from and to Vector.

Inverse(a: Quaternion)

Quaternion

Returns the inverse of the given Quaternion.

RotateTowards(from: Quaternion, to: Quaternion, maxDegrees: float)

Quaternion

Returns the quaternion rotated towards To with a maximum degree change.

PreviousVector3NextDict

Last updated 7 months ago