playMaker

Author Topic: 2d platform question  (Read 1749 times)

Gav (HeyBud)

  • Full Member
  • ***
  • Posts: 126
    • Tumblr
2d platform question
« on: July 26, 2015, 04:30:17 PM »
How would you make a 2d platform so player jumps through bottom and lands on it? My idea is to have a trigger above platform if player enters trigger and stays, box collider activates under its feet. Is that logic too convoluted?

Any ideas on better solution? Thanks

antibob

  • Playmaker Newbie
  • *
  • Posts: 24
    • BillsClass
Re: 2d platform question
« Reply #1 on: July 26, 2015, 09:33:28 PM »
You could test the Y position of the player and if Y is greater than the platform, collider is turned on. This may get tricky if Physics based enemies are patrolling on the same platform.

There is probably a more appropriate way to handle it, but that's how I would start.

Looking forward to hearing other solutions.

-ab

Gav (HeyBud)

  • Full Member
  • ***
  • Posts: 126
    • Tumblr
Re: 2d platform question
« Reply #2 on: July 27, 2015, 04:10:42 PM »
Thanks, I 'll try it. It might be a problem because my pivot is not at the players feet. I should have done that from the beginning. I guess I could just add a parent.

The trigger way didn't work very well. The player could easily get caught in the middle of the platform when it's activated. If the trigger is high enough so player won't get stuck, he leaves the trigger and the trigger deactivates.
« Last Edit: July 27, 2015, 04:13:25 PM by Sarcophagav »