Rigidbody2D Move Towards Position
Moves a Rigidbody2D toward a world position using MovePosition.
Parameters
| Parameter | Description |
|---|---|
| Rigidbody2D | The Rigidbody2D to move. |
| Position | The world position to move toward. |
| Max Speed | Maximum movement speed in units per second. |
| Finish Distance | Finishes when the remaining distance is less than this value. Use -1 to never finish. |
| Finished Event | Optional event sent when the move finishes. |
Notes
- This is useful for path points, click-to-move destinations, and scripted 2D movement.