Offset Damage Hitbox (FIXED)

How do I…

So, How do I fix the hitbox, they are both 32 by 32, but they are offset.

What is the expected result

The expected result is that the damage hitbox lines up with the robot that you are supposed to jump on to damage.

What is the actual result

The actual result however, is that it is off set from the robot.

Related screenshots

Hi,

Based on the terms you use (robot, hitbox) and what we can see in your events (NewSprite6, NewSprite7) it is not really obvious what is what.
I assume that your hitbox is NewSprite7 and that the robot you are talking about is NewSprite6. In this case you have to set the y-position of NewSprite7 to NewSprite6.Y(). At the moment it is 151.

If that is actually not your problem, you could check the position of your sprites’ origin points. By default it is in the upper left corner. If it is changed for one of the sprites they don’t align properly.

2 Likes

Hey, so, that would’ve been great, but it still doesn’t work, it might be because of the resizing of the hitbox. But thanks for trying to help!

Alright, what did you try?

I still don’t know what your robot and what the hitbox is. If you believe it has something to do with resizing the hitbox-sprite (you wrote both sprites are 32 x 32 px) you could just make a hitbox that has the right size by default.

1 Like

Yeah, that’s most likely the issue, thanks.

1 Like

Ok, I just edited it to the current updated result.

Okay, as mentioned, I would make a hitbox that has exactly the size that you need. Based on your screenshot the origin point of the hitbox is in the upper left corner, but for your robot it is in the center.

You just need to put the origin point of the robot back to the upper left corner.

1 Like

Ok, thanks, I will try that.

It works, thanks for helping!

2 Likes