playMaker

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

Gav (HeyBud)

  • Full Member
  • ***
  • Posts: 126
    • 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: 15500
  • Official Playmaker Support
Re: How would I set up 2D gravity in a center point like mario galaxy planet?
« Reply #1 on: February 03, 2014, 04: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: 126
    • Tumblr
Re: How would I set up 2D gravity in a center point like mario galaxy planet?
« Reply #2 on: February 03, 2014, 01:29:02 PM »
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, 01:32:28 PM by Sarcophagav »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How would I set up 2D gravity in a center point like mario galaxy planet?
« Reply #3 on: February 04, 2014, 05: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: 126
    • Tumblr
Re: How would I set up 2D gravity in a center point like mario galaxy planet?
« Reply #4 on: February 04, 2014, 01:34:51 PM »
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.