Skip to content

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 empty GameObject) 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

  1. Create an empty GameObject as the center (e.g., SystemCenter).
  2. For each planet root (e.g., Planet_Europa), add OrbitBody and set:
  3. Center: drag SystemCenter
  4. Radius (Distance): world-space units (matches your planet radius scale)
  5. Period (seconds): full revolution time
  6. Inclination (deg): tilt relative to the center's XZ plane
  7. Phase (deg): starting angle
  8. (Optional) Add SpinBody to the planet root and set:
  9. Axis: local axis to spin around (typically Y)
  10. 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–60s per orbit is readable in demos.
  • Inclination: 0–15° for subtle variety; 25–40° for dramatic systems.
  • Spin: Keep SpinBody speed 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.