Player jumping through the platforms

https://studio.code.org/projects/gamelab/sgGjppoL3sLqTlcXjYg4s4gUaZT3QbDhsYJUYFDIEbw

I have a student who is struggling to make it so the platforms cannot be jumped through by the characters. The jumping itself is also very wanky. Any help to solve these problems would be amazing.

Hi @jmarro,

Great looking fun game! I have to be honest, I am not sure why the Player sprite was jumping right through the platforms. I am going to guess he was moving so fast that the collider just didn’t have time to react (but that is just a guess). I remixed and reduced the counter pattern for the Player.y’s motion when you pressed the “up” key. It was at 100 I believe - I reduced it a lot:) I also changed the “up” key from keyWentDown to keyDown. My version now works and the Player sprite collides with the platforms. Have your student play around with those and see if they can get it to work.

~Michelle

Howdy @jmarro,
this might not seem obvious at first but the position in the jump code is changing instantaneously, which means that no collider will detect it, since it skipped ever touching the bottom of the wall, there is documentation on using sprite velocities https://studio.code.org/docs/ide/gamelab/expressions/velocityY which may prove to be more consistent jump that your looking for in such a project