playMaker

Author Topic: Planets orbiting a star  (Read 8847 times)

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Planets orbiting a star
« on: October 07, 2024, 03:05:06 PM »
Hello,

I have planets that need to move in a circular orbit around an object, but I don't know how to do this. I think it has something to do with the Trig functions, but I'm too dumb to understand it (barely passed Trig in college), so if you could explain in great detail that would be awesome. Thanks!

stigma

  • Full Member
  • ***
  • Posts: 218
Re: Planets orbiting a star
« Reply #1 on: October 31, 2024, 12:18:59 PM »
Use the new spline system of Unity.
GameObject -> Spline -> Draw Splines Tool
Then you add the Spline Animate script to the planet.
It's very easy to use

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: Planets orbiting a star
« Reply #2 on: November 11, 2024, 11:13:13 AM »
Hi,

 A simple approach is to attach each planet to a dummy transform that represent and is the center of the rotation, then you simply animate that dummy.

Bye,

Jean