Hitbox errors when center moved / github question

I noticed if i move the center of an object to the edge (to have it swing like a door), the hit box is wrong (almost like it is offset to still be on the center?). I wanted to research the problem before coming here and found this:

my “how do i” question is "how do i know if that post indicates the problem should be solved and I’ve experienced an unknown bug, or whether that post is just saying it is a known issue and to work around it?

Cheers for the clarification

The ‘merge into master’ means it is something that has been added to GDevelop (at some point, doesn’t necessarily mean that it’s still used).
You should look in the “issues” tab. You’d find those two:

Is it one of these? What sort of object is it?

I had the same problem a year ago, it is still here.
My solution was a 50% larger sprite with no content, so it’s okay when I move the center by 50% to the left and 50% hitbox are missing.
A real fix would be nice, if it’s possible without causing other problems.

Is it a tiled or panel sprite?

tiled has no center point :slight_smile:

The problem is with any normal sprite. It becomes super apparent when trying to make platforms/doors. Here are the steps to reproduce:

  1. make a rectangular sprite 16x64px.
  2. edit the points on it so the center is at 0,64.
  3. do a standard collision test with another object and you’ll see no collision with the top 32px of the rectangle

Thanks for clarifying the issues tab. Since the “merged” issue identified exactly the issue in its subject, I was confused as to how to know what behavior to report.


1 Like