Move Towards Actions
Move Transforms toward points, targets, or directions - with optional smoothing and speed limits.
These actions provide flexible movement controls that can follow moving targets smoothly or move toward fixed positions at variable speeds.
When to use
MoveTowards Actions are designed for continuous tracking - perfect for characters, cameras, or effects that follow a moving target every frame.
For timed, one-off motions or custom easing curves, use Tween Actions.
Shared Motion Parameters
All MoveTowards actions share two optional parameters that control how smoothly and how quickly movement happens:
| Parameter | Description |
|---|---|
| Smooth Time | The time (in seconds) it takes to roughly halve the remaining distance to the target. Smaller values make motion snappier. Set to 0 for instant movement. |
| Max Speed | The maximum movement speed in units per second. Use 0 to remove the speed limit. Useful for capping movement speed while keeping smooth motion. |
How Smoothing Works
The Smooth Time parameter uses an exponential damping algorithm - similar to Unity’s SmoothDamp.
This means movement slows as it approaches the target (ease-out behavior), producing natural motion for following moving targets.
Move Towards Target
Moves a Transform towards another Transform’s position.
| Parameter | Description |
|---|---|
| Transform | The Transform to move. |
| Target | The Transform to move towards. |
| Axis | Which axes to move along (e.g., XZ for top-down games). |
| Smooth Time / Max Speed | Optional smoothing and movement speed limit. |
| Finish Distance | Stop moving when closer than this distance. Set to -1 to never stop. |
| Finished Event | Event sent when movement is finished. |
Move Towards Position
Moves a Transform towards a world position.
| Parameter | Description |
|---|---|
| Transform | The Transform to move. |
| World Position | The position in world space to move toward. |
| Axis | Which axes to move along. |
| Smooth Time / Max Speed | Optional smoothing and movement speed limit. |
| Finish Distance | Stop moving when closer than this distance. Set to -1 to never stop. |
| Finished Event | Event sent when movement is finished. |
Move Towards Mouse (2D)
Moves a Transform towards the mouse position in world space (2D).
Ideal for cursor-following objects or top-down movement systems.
| Parameter | Description |
|---|---|
| Transform | The Transform to move. |
| Camera | The camera used to project mouse position into world space. |
| Axis | Which 2D axis should move (typically X and Y). |
| Smooth Time / Max Speed | Optional smoothing and movement speed limit. |
| Finish Distance | Stop moving when closer than this distance. Set to -1 to never stop. |
| Finished Event | Event sent when movement is finished. |
Example Usage
These actions are commonly used for:
- Player Movement: Move Towards Mouse (2D) or Move Towards Target
- Enemy Chasing: Move Towards Target to follow the player
- Camera Follow: Move Towards Target or Move Towards Position with a small Smooth Time
- Doors, Platforms, or Levers: Move Towards Local Position for precise, local motion
Example Setup
- Add Move Towards Target to an enemy GameObject.
- Set Target to the player Transform.
- Adjust Smooth Time to 0.3 for smooth following.
- Set Max Speed to 5 for controlled movement speed.
- Set Finish Distance to 0.1 to trigger an event when the enemy reaches the player.
The enemy will move toward the player smoothly, slowing as it approaches the target.