Skip to main content

Quaternion.SetFromToRotation(Vector3 fromDirection, Vector3 toDirection)

Creates a rotation which rotates from fromDirection to toDirection.

Parameters:

NameTypeDescription
fromDirectionVector3from Direction
toDirectionVector3to Direction

Usage

---@type Quaternion
local quaternion;

---@type Vector3
local fromDirection;

---@type Vector3
local toDirection;


quaternion.SetFromToRotation(fromDirection, toDirection)