jorbascrumps

How to create ladders (with Matter)?

Recommended Posts

Hi all,

I'm looking for some advice/ pointers on how to best go about creating ladders with Matter physics. At the moment, I'm adding a sensor for each ladder tile and then setting a flag on collision. If the player has this flag set and presses up (or down), I apply a force to the body in the desired direction. It doesn't feel like a very robust solution and the player tends to slide around. Is there a better way to handle this?

Thanks

Share this post


Link to post
Share on other sites

Is there a gravity setting in a Matter? Try to disable it for a player when it is on a ladder. Then it shouldn't slowly move down. Also you don't need sensors, since you can detect overlaps with needed tiles directly

Share this post


Link to post
Share on other sites

The biggest mistake I made was applying force instead of setting velocity. Once I did that, the sliding stopped. It still doesn't feel quite right when I play test it, but I'll tweak it.

The overlap detection you mentioned, is that available in Matter or just Arcade?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.