Discuss Scratch

Lulu57nd
Scratcher
19 posts

Hitbox

Can someone please explain how to make hitboxes?
tank401
Scratcher
100+ posts

Hitbox

Put a different costume in the sprite you want, and switch to it before you have any collision stuff happen, then when your done switch back
Catscratcher07
Scratcher
1000+ posts

Hitbox

In general, you can just use
touching?
, no need for special hitbox sprites/costumes.

If that doesn't work for your project for some reason, we'd need a link so we can determine exactly what you need.
Catscratcher07
Scratcher
1000+ posts

Hitbox

tank401 wrote:

Put a different costume in the sprite you want, and switch to it before you have any collision stuff happen, then when your done switch back
if you are using this method, your collision has to be handled in a “run without screen refresh” custom block, otherwise your physics will take multiple frames and show your hitbox costume.
ametrine_
Scratcher
1000+ posts

Hitbox

Catscratcher07 wrote:

In general, you can just use
touching?
, no need for special hitbox sprites/costumes.
except 99% of the time when your sprite is detailed, there will be collision issues that require hitboxes to fix.

Last edited by ametrine_ (Dec. 14, 2024 16:56:18)

Catscratcher07
Scratcher
1000+ posts

Hitbox

ametrine_ wrote:

Catscratcher07 wrote:

In general, you can just use
touching?
, no need for special hitbox sprites/costumes.
except 99% of the time when your sprite is detailed, there will be collision issues that require hitboxes to fix.
It's far less than 99%— it only is necessary if you either need a very regular shape or if you have wiskers/a tail/other stick-out appendages in a platformer.

Generally, it is best to encourage the simplest posible solution and give more complicated responses if said solution doesn't work, rather than start with a potentially overcomplicated solution.
ametrine_
Scratcher
1000+ posts

Hitbox

Catscratcher07 wrote:

Generally, it is best to encourage the simplest possible solution and give more complicated responses if said solution doesn't work, rather than start with a potentially overcomplicated solution.
it's still probably better to actually answer the question, however, instead of just saying “don't use hitboxes”
Catscratcher07
Scratcher
1000+ posts

Hitbox

ametrine_ wrote:

Catscratcher07 wrote:

Generally, it is best to encourage the simplest possible solution and give more complicated responses if said solution doesn't work, rather than start with a potentially overcomplicated solution.
it's still probably better to actually answer the question, however, instead of just saying “don't use hitboxes”
I didn't say “don't use hitboxes”, I started by questioning the need for them and leading into the simpler solution, and then allowed for further questions if that doesn't work, requesting a link since if a hitbox system is needed, the exact hitbox system needed would vary by project.
Lulu57nd
Scratcher
19 posts

Hitbox

thanks everyone

Powered by DjangoBB