>
> > Easy.
> > random(315, 360+45)
> >
> > Anything that takes an angle will be fine with that. Or if you want to keep it in range you can do:
> > random(315,360+45)%360
> >
>
> Forum won't let me PM you. I have a question about a reply you made on here back in 2014, found here viewtopic.php?f=147&t=97994&p=1128268#p1128268. Do you still have that CPX for gravity simulation? I'm making a game using 2-body orbital mechanics and would love to take a peek, but the dropbox link is down.
>
For the simulation, are you interested in a deterministic model, or a numerical approach?
I.e. -- Do you want everything to be parametrically-determined parabolas, or do you need acceleration to be computed dynamically based on forces?
Deterministic approach:
https://www.simbucket.com/simulation/orbital-motion/
Forces approach:
https://www.simbucket.com/simulation/satellite-motion/
If I correctly understand your question, the context of my game requires it to be the Forces approach. I will have dynamic mass, thrust, direction, etc for the player's ship. Best case scenario is this: I have a stationary star, some planets orbiting that star, and a few moons orbiting some of the planets. If a player could use their semi-customized ship (mass, thrust, throttle capability, etc will all be dynamic based on player choice) to leave orbit of the 'home' planet and rendezvous with another orbiting body that would be my goal.