Skip to main content

Transform.LookAt(Transform target, Vector3 worldUp = Vector3.up)

Rotates the transform so the forward vector points at /target/'s current position.

Parameters:

NameTypeDescription
targetTransformObject to point towards.
worldUpVector3Vector specifying the upward direction.

Usage

---@type Transform
local transform;

---@type Transform
local target;

---@type Vector3
local worldUp;


transform.LookAt(target, worldUp)