Orbital System (Optional Module)¶
This module lets planets orbit a center object and optionally spin on their own axis. It is designed to be lightweight and scene-friendly.
Concepts¶
- Center — any
Transform(e.g., an emptyGameObject) that represents the focal point of the system. - OrbitBody — component that moves a planet around the center in a circular orbit.
- SpinBody — component that rotates a planet around its local axis.
Current version models circular orbits with a simple inclination. Eccentricity and per-apsis rotation can be added later without breaking API.
Add Orbits Manually¶
- Create an empty
GameObjectas the center (e.g.,SystemCenter). - For each planet root (e.g.,
Planet_Europa), add OrbitBody and set: - Center: drag
SystemCenter - Radius (Distance): world-space units (matches your planet radius scale)
- Period (seconds): full revolution time
- Inclination (deg): tilt relative to the center's XZ plane
- Phase (deg): starting angle
- (Optional) Add SpinBody to the planet root and set:
- Axis: local axis to spin around (typically
Y) - Speed (deg/sec): rotation speed
Editor Window (if present)¶
If your build includes Orbital System editor:
- Add Planet: places selected planet into the system with default orbit params.
- Randomize System: spawns several planets with varied distances, periods, inclinations, and colors (uses the same Planet Builder under the hood).
- Center: select the central transform for the system.
Parameter Tips¶
- Units: Orbit distance should be larger than the planet radius. Start with
distance ≈ 8–20 × planet radius. - Period: Short periods look arcadey;
10–60sper orbit is readable in demos. - Inclination: 0–15° for subtle variety; 25–40° for dramatic systems.
- Spin: Keep
SpinBodyspeed moderate (5–30 deg/sec) to avoid motion blur artifacts.
FAQ¶
Q: My planet clips the ring while orbiting.
A: Increase ring Inner radius or the planet orbit distance.
Q: Eccentric orbits?
A: Not yet. The current component is circular by design. We’ll expose eccentricity and argument of periapsis in a future update.