Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

instances.turn (procNode)

Compose two rotations: the quaternion product a * b (x, y, z, w), which turns by b first and by a second. Per element when either is a field. A quaternion is written as a record { x, y, z, w }.

Inputs

  • a (Vec4, default (0, 0, 0, 1)). The rotation applied second, as a quaternion (x, y, z, w).
  • b (Vec4, default (0, 0, 0, 1)). The rotation applied first, as a quaternion (x, y, z, w).

Outputs

  • rotation (Vec4). The product a * b.
local both = g.instances.turn({ a = { x = 0, y = 0.7071068, z = 0, w = 0.7071068 }, b = { x = 0.7071068, y = 0, z = 0, w = 0.7071068 } })