Author Topic: Orbital Corrections  (Read 3833 times)

Jeheace

  • Seedling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 33
Orbital Corrections
« on: August 05, 2010, 12:40:11 PM »
I can set up a stable orbit the hard way, trial and error right now (playing with density vs. momentum vs. distance from main gravity well) or I'm sure that I could figure out the mathematical to figure all of that out... but I'm looking into doing it the quick and dirty way... get close enough with option 1 (trial and error) and add some orbital correction scripts...

I'm looking at these basic functions to begin with...

Position (not sure how to use this, but I hope it'd get the roids cords)
&
MoveTo(x,y)

But I'd have to know what quadrant the the roid is in, or every time it passed either axis it would jump... so i need a 'when x=0 check if y is positive. If yes, MoveTo(0,600)), else MoveTo(0,-6000) and a similar y check... o.O

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: Orbital Corrections
« Reply #1 on: August 05, 2010, 06:11:16 PM »
If you're making orbits in the gravity engine, you should use the gravity variables provided.  :>  CoordX[], CoordY[], MomentumX[] and MomentumY[]


The easiest way to make something orbit something else, is to put it directly below, and give MomentumX a small value.

Like this: