howw to make a gravity field around a planet (circular object)

diegocsdiegocs Member Posts: 531
edited April 2012 in Working with GS (Mac)
i have a planet and objects inside this planet which is circular shaped, and i have this player that runs on top of the planet (which surface is curve) and when it jumps its supposed to go back to the ground by gravity (goes toward the center like in mario galaxy, how can i do that?

Answers

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Accelerate down? Would that work?
  • MantoManto Member Posts: 796
    You should download DBA Planet Hopper.
  • diegocsdiegocs Member Posts: 531
    i want them to accelerate toward the center of the planet, if the player is in the right side, it is supposed to accelerate toward the center (which would be towards the left), if it is in the left side the opposite, and so on
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Get the magnitude between the player and the planet.

    Then when magnitude is < whatever
    -accelerate towards planetX and planetY
  • diegocsdiegocs Member Posts: 531
    i made the actor accelerate toward the planet (in direction to the planet's center) when it jumps and all with the magnitude attribute, but i don't know why the actor keeps on moving around the planet even after its touching ground
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited April 2012
    Tell it to only accelerate towards the planet when its not touching it, and add some drag to the player thats accerating. If needed also try changing its motion linear x and y to 0 when it collides with the planet.
  • diegocsdiegocs Member Posts: 531
    fix it already, thanks anyway
  • ZoytZoyt Member Posts: 374
    Just test if it is colliding with an invisible feild and if so, use Accellerate Towards to accellerate it to the plannet.
Sign In or Register to comment.