Euflorium: The Eufloria Community

Eufloria => Eufloria Classic => Eufloria Classic Mods => Topic started by: Jeheace on August 05, 2010, 12:40:11 PM

Title: Orbital Corrections
Post by: Jeheace 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
Title: Re: Orbital Corrections
Post by: annikk.exe 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:


(http://img835.imageshack.us/img835/6372/ezorbit.png)