Discuss Scratch

ksdavidc
Scratcher
100+ posts

was it always like this? touching not detecting platforms beyond edge of screen.

My question is ONLY if this is a new behavior or it was always like that and I just didn't notice. I know I can use a hitbox to fix it.

Sample project: https://scratch.mit.edu/projects/1210873976/

This is hard to describe, but when my platform extends beyond the edge of the screen, detection of touching platform fails outside the screen. I don't remember this being a thing.

In the sample project, cat is standing on a platform. The pull up routine detects if touching and pull the character up so cat stays on the platform.


when x is around -270, the cat falls, even though cat is standing on the platform. (note that platform is moving with cat, it has no edge) You can see that y velocity keeps falling at that point, which means touch detection failed outside of the screen.


I know the code (my blocks) is a little wonky, that was me troubleshooting.

My browser / operating system: MacOS Macintosh X 10.15.7, Chrome 139.0.0.0, No Flash version detected
ka-ch0ng
Scratcher
21 posts

was it always like this? touching not detecting platforms beyond edge of screen.

Yes, I think in general this has always been sort of a bug - Offscreen-related things were always like this, kinda how some 3d projects break because Scratch refuses to draw lines beyond the screen. I think there's a simple workaround - I just forgot it.
ispretty
Scratcher
500+ posts

was it always like this? touching not detecting platforms beyond edge of screen.

ka-ch0ng wrote:

Yes, I think in general this has always been sort of a bug - Offscreen-related things were always like this, kinda how some 3d projects break because Scratch refuses to draw lines beyond the screen. I think there's a simple workaround - I just forgot it.
you're describing two completely different issues; getting sprites offscreen has a simple workaround, but detecting collision with the touching block is impossible without TurboWarp (and yes, this was always an issue)

Last edited by ispretty (Sept. 3, 2025 03:17:32)

ksdavidc
Scratcher
100+ posts

was it always like this? touching not detecting platforms beyond edge of screen.

ka-ch0ng wrote:

detecting collision with the touching block is impossible without TurboWarp

Uh, isn't the touching block explicitly for detecting collision? The question is whether it can detect collision with an svg sprite on the part of that sprite is offscreen. My example is an attempt to show not being able to do so is quite unintuitive.

Last edited by ksdavidc (Sept. 5, 2025 03:12:21)

Powered by DjangoBB