Discuss Scratch

CornBread40
Scratcher
1 post

How to click through a sprite?

I am making a project, and I want to be able to click through a sprite. This sprite takes up the whole space (it's partially transparent, so one can see what's underneath), and there are other sprites underneath it that I want to be able to click. If this isn't possible, please advise on what I should do instead to achieve what I'm after.
-EmeraldThunder-
Scratcher
1000+ posts

How to click through a sprite?

You could give the sprites a hitbox and see if the mouse pointer is down and colliding with the hitbox.

Nothing here.
Stag_
Scratcher
100+ posts

How to click through a sprite?

Use hitboxes. If the mouse is down (clicking) and touching the hitbox (basically touching the sprite) Probably not what you want, but there is no way for a sprite to be clicked or sensed through (mouse pointer) Many platformers use hitboxes for better movement and collision detection.

bruh ninja'd bc of new scratcher limit >:(

Last edited by Stag_ (Nov. 1, 2021 20:36:22)

Powered by DjangoBB