Discuss Scratch

Spaicrab
New Scratcher
2 posts

Need help with collision detection.

I was making something like a platformer, where if you jump you land when you touch a block at your feet and when you walk you stop when you run into a block, but the problem is, every block is the same sprite and costume, so when i try to walk the scripts instantly sends me back because the character's feet are touching the ground, and the game thinks i am running into a wall. Does someone have a solution to this?
deck26
Scratcher
1000+ posts

Need help with collision detection.

Have you looked at @griffpatch_tutor's platformer tutorial?

In many platformers the sprite is actually not touching the ground but actually just one pixel above it. I can't remember if that's what that tutorial uses. But using different sprites for walls can also be an easier solution.
Spaicrab
New Scratcher
2 posts

Need help with collision detection.

Thanks, i'll go check out the tutorial.
I won't use differents sprites because i want to do something like super mario maker, where you place blocks in a grid and they all function the same

Powered by DjangoBB