Jump to content

Moving platform


Flurin Egger
 Share

Recommended Posts

Hi,

 

I'm trying to create a plaformer which contains lifts and moving platform. I'm pretty new to building games so I was wondering what would be the best way to tackle a moving platform (the player has to be able to jump onto it)?

 

I've currently created a seperate group which has a tween that has yoyo set to true. While this works, there are a couple of problems:

 

  1. Once the player is on the platform he doesn't move with the platform. What would I have to do to accomplish them moving together?
  2. When the player is moving he collides nicely with the moving platform but when he's idling the platform moves just behind him. What am I doing wrong?

Hope someone here can give me some pointers what to look at :)

 

Kind regards,

Flurin

Link to comment
Share on other sites

The issue is most likely the result of using a Tween to position the platforms x/y values directly. This moves it independently of the physics system, so collision has no data to work from and the player/platform ignore each other. See if you can tween the body properties of the platform instead. It will take a little more fine-tuning to get the result right, but they should then collide properly.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...