Rotation Axis/Angle (Expression) — Skript

Addon: Skript · Category: Expression · Since: 2.10

Syntax

[the] rotation (angle|axis) of %quaternions%

Description

Returns the axis or angle that a quaternion will rotate by/around. All quaternions can be represented by a rotation of some amount around some axis, so this expression provides the ability to get that angle/axis.

Examples

set {_quaternion} to axisAngle(45, vector(1, 2, 3))
send rotation axis of {_quaternion} # 1, 2, 3
send rotation angle of {_quaternion} # 45
set rotation angle of {_quaternion} to 135
set rotation axis of {_quaternion} to vector(0, 1, 0)

View source