playMaker

Author Topic: How would I set up 2D gravity in a center point like mario galaxy planet?  (Read 1238 times)

Gav (HeyBud)

  • Full Member
  • ***
  • Posts: 117
    • View Profile
    • Tumblr
Is this possible to do with playmaker? I'd like to have a 2d circle collider and be able to have player run around on it's surface in players X axis.  Could i achieve this somehow with Set Gravity 2D action?  ::)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14595
  • Official Playmaker Support
    • View Profile
Re: How would I set up 2D gravity in a center point like mario galaxy planet?
« Reply #1 on: February 03, 2014, 02:04:29 AM »
Hi,

 yes, you could. You would simply set the gravity as the player moves around to adjust the gravity based on where he is.

bye,

 Jean

Gav (HeyBud)

  • Full Member
  • ***
  • Posts: 117
    • View Profile
    • Tumblr
Re: How would I set up 2D gravity in a center point like mario galaxy planet?
« Reply #2 on: February 03, 2014, 11:29:02 AM »
Hi Jean, thanks for the reply.
I should clarify that I'd like everything on the circle to adhere to the gravity anywhere on the surface, like a planet. I was hoping to have enemies and other game objects also stick on the surface in different places.
I would imagine that if the gravity changes with the character, that would mean objects/NPCs on opposite side of circle would fly away into space. Or am I wrong would I just need to set the gravity as the player moves to adjust it where he is?
Thanks,  :)
Gavin

« Last Edit: February 03, 2014, 11:32:28 AM by Sarcophagav »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14595
  • Official Playmaker Support
    • View Profile
Re: How would I set up 2D gravity in a center point like mario galaxy planet?
« Reply #3 on: February 04, 2014, 03:51:38 AM »
Hi,

 no, you will have to do this for all objects, as their gravity direction will each be unique.

also, check this out, it may be exactly what you need.

http://lanemax.blogspot.com/


bye,

 Jean

Gav (HeyBud)

  • Full Member
  • ***
  • Posts: 117
    • View Profile
    • Tumblr
Re: How would I set up 2D gravity in a center point like mario galaxy planet?
« Reply #4 on: February 04, 2014, 11:34:51 AM »
Ah, that makes sense. Thanks for what you do, man. I'm sure I'll need help again in the future. I'll look into those tutes, too.