Skip to content

Api > Transform > Rotate()


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:⚓︎

Name Type Description
eulers Vector3 The rotation to apply.
relativeTo Space Determines 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)