Calculate the orbit velocity

0 favourites
  • 2 posts
From the Asset Store
With simple one-touch controls and vibrant graphics, the goal is to orbit as many planets as possible to achieve the hig
  • I have got the physics part down to make a satellite use physics to orbit around a planet. I used a formula given by leparlon:

    -Set the world gravity to 0

    -Physics behaviour in all the objects in with the gravity force will act (in this case, the crates).

    -Events:

         Each 0.5 seconds (for better performance)

         Apply Force On CRATE Toward position MOON.X, MOON.Y->GLOBAL_VARIABLE * (CRATE.mass + MOON.mass) / ((CRATE.X - MOON.X)*(CRATE.X - MOON.X) + (CRATE.Y - MOON.Y)*(CRATE.Y - MOON.Y))

    My Question: Using a variable "mass" on the planet and object, and using the distance between the moon and object, how do I get Velocity?

    V=SQRT((G{Gravity}*M{Mass of Moon})/R{Distance of center of moon to object})

    Hint (WHAT IS Gravity in this case???????) You cant use 6.67*10^11...

    Ultimately I want to have the object start out at a perfect speed to create a perfect orbit at start of layout. Distance will vary, as will mass of each moon and object.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think I will re-ask this question because it was confusing...

    I would like to calculate the velocity it takes a moon to orbit a planet at the start of layout using the following:

    Mass of the objects: I have redone the orbit events to use the moon.physics.mass and planet.physics.mass. FYI-This internal value is calculated using the area of the collision mask (set to circle) * Density (internal physics variable) which can be changed to make an object heavier.

    Distance between the objects: Using Construct 2�s Distance formula. Distance(moon.x,moon.y,Planet.x,planet.y)

    Gravity: This is an unknown to me, and part of my problem.

    According to physics laws, to calculate the velocity of an orbiting satellite, you must use this formula: Velocity= Square root of ((Gravity * Mass of Planet) / Distance between center of planet and Satellite center). I need to know what I use for Gravity�

    Currently I have an initial impulse hard set as a onetime event that sends the satellite moon into orbit, but it took many tries to figure out an optimal number.

    Here is the Link to my Example:

    https://app.box.com/s/llz72y0cvlf1rvudv5uh

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)