How do you make a sprite stay on another?

This is a new one-button blocks game I am working on. I want to stop the “Jumpee” sprite from sliding off the platforms. How should I do this?

(Extension by felixtsu)

(This is kind of like the first part of slope-physics-demo by richard. How did he do it?)

Also, A is to jump. Sometimes when the player lands on a platform, he is not able to jump anymore. How do I fix this?

Great game!

To be sticky it means when ‘Jumpee’ is on a platform, it gains the same vy of the platform, and 0 ay.

Whether having the same vx, or some proportion of it is up to you, say vx=0 means no friction while same vx mean totally sticky.

1 Like

Thanks! This really helps! :grinning:
Although, I’m still having problems.

I have been playing with this concept too and I think i fixed it. Check it out.