Look At Rotator
Rotate an object to face a target or direction.
Introduction
Look At Rotator keeps an object turned toward a target at all times, like a security camera following players around the room. Speed zero holds it still. The Look At Rotator component panel in the Uni editor Image The Look At Rotator component panel in the Object editor. caption
How to Access
Select an object, open the Properties Panel, then press the Add Component button at the bottom and pick Look At Rotator. The component stacks onto the object as a new accordion of properties. How to Access - Add Component in the Properties Panel
Another Way to Access
Shortcut: open the Asset Panel, go to the Device tab, Basic category, and click the Look At Rotator block. The editor spawns a cube with Look At Rotator already attached, ready to adjust. How to Access - the Look At Rotator block in Asset Panel > Device > Basic
Properties
Target Mode Enum Chooses what the object keeps facing: Object (one specific object picked in the scene), Player Character (the nearest player), or Tag (the nearest object carrying the selected tag). Speed Float How quickly the object turns to face its target, from 0 to 1. At 0 it never rotates. Radius The maximum range. If the target moves beyond this distance, the object stops following it with its gaze. Stay Upright Bool Keeps the object locked upright on the Y axis so it never tilts up or down while tracking. Front Button Sets which side of the object counts as its front. Property Type Description Every property on the Look At Rotator component.
Events
Look At Rotator has no events.
Commands
Reset Returns the object to its original facing. None Command Description Parameter Commands that drive the component from a script.
Example
A spotlight continuously follows a character, keeping the light pointed at them. The same setup can be used for turrets, cameras, and other objects that need to face a target. Look At Rotator - simple example