playMaker

Author Topic: Platforms  (Read 1257 times)

Seiryu33

  • Full Member
  • ***
  • Posts: 133
Platforms
« on: December 29, 2015, 05:21:39 AM »
This is one that is a little hard to explain, but a common aspect to 2d platformers is being able to jump onto platforms from below. I'm not sure how to go about programming them. Only way I can think of is triggering Colliders being created onto the platform in question. Anyone know a more expedient way to do it?

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Platforms
« Reply #1 on: December 29, 2015, 08:52:11 AM »
The way I did it for a 2d platformer I made was to use a plane with a mesh collider on it- this worked most of time- it would sometimes throw the player high into the air though-

You could also keep track of the y position of the player- and when the player enters a trigger on the platform check the players y pos- if it is less than the platform then disable it- if its more than enable it

You could also have a trigger on the underside of the platform that enable a collider on top of it when the player exits the trigger-

Just a few ideas- hope that helps-
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!