Skip to content

Transform Look At Target 2D

Rotates a Transform in 2D so a chosen local axis faces another Transform.

Parameters

Parameter Description
Transform The Transform to rotate.
Target The target Transform.
Facing Axis 2D local axis that should face the target.
Smooth Time Smoothing time in seconds.
Max Speed Maximum turn speed in degrees per second.

Notes

  • This is useful for 2D enemies, turrets, and cursor-like followers.