Transform List Wrap In Sphere
Wraps a group of Transforms inside a sphere around a center Transform.
When an object leaves the radius, it is teleported to the opposite side of the sphere. This is useful for looping play spaces such as asteroid fields, endless space scenes, or floating debris around the player.
Parameters
| Parameter | Description |
|---|---|
| Transforms | The Transform List to wrap. |
| Center | The center of the wrapping sphere, usually a camera, player, or ship. |
| Radius | The world-space radius of the wrapping sphere. |
Notes
- This action updates every frame by default.
- Null list entries are ignored.
- If the list is empty, or the center is missing, the action does nothing.
- Objects are wrapped by mirroring their direction through the center while keeping them on the sphere radius.
Example
Use this action in a space shooter to keep nearby asteroids around the player:
- Store active asteroid Transforms in a Transform List.
- Set the player ship or camera as the center.
- Choose a radius that defines the active play area.
- Run the action every frame so objects that drift too far wrap back into range.