Skip to main content

Transform.Rotate(Vector3 eulers, Space relativeTo = Space.Self)

Applies a rotation of eulerAngles.z degrees around the z-axis, eulerAngles.x degrees around the x-axis, and eulerAngles.y degrees around the y-axis (in that order).

Parameters:

NameTypeDescription
eulersVector3The rotation to apply.
relativeToSpaceDetermines whether to rotate the GameObject either locally to the GameObject or relative to the Scene in world space.

Usage

---@type Transform
local transform;

---@type Vector3
local eulers;

---@type Space
local relativeTo;


transform.Rotate(eulers, relativeTo)