[SOLVE kinda] Collision not working properly

  1. After mouse click on wheel(on layer UI2) ; hide layer UI2
    1

  2. The object

  3. The hit point setup

  4. Play : The mouse should only be able to close the layer if it click the wheel (sorry the mouse are not visible
    4

But the problem is mouse is able to click the wheel even it doesn`t touch the wheel hit point(the mouse hit the red line area, but the engine count as hit).

How do i fix this ?

1
Sorry mouse still not visible

the picture if you want to test out the collision
path917

Strange, it also happens for me.
I start as this for minimum:
image
Then, I add more hit points to make the inner part. It doesn’t work either.
If I preview with this, the inner part will collide just like yours. Note the part where it says “Polygon is not convex!” I think it may be a bug, but not sure if to report it.


My only advice here is to accept the issue for now? Sorry I’m not sure how to solve it since it’s related to hit point’s coding.

Polygon is not convex is correct, this mean your shape is concave, concave shape have at least one angle inside the shape. Maybe this definition is more accurate

The sentence can be invert for said “Polygon shape is concave” if it’s more simplier.

The cursor canno’t interact with the custom hitboxes.
The cursor interact only with the AABB of sprite.
Only sprites can be. You can always attach a invisible sprite on your cursor and this will working.

1 Like

Yes, that’s fine actually. I read the text as some warning that the sprite collision will not work correctly.
For example this should not be counted as collide with the custom hitbox, but it is counted as colliding (light green = collision true):
(Here the collision is tested with 8 direction behaviour sprite)
image
If I move away from it, it will not be counted as colliding. I think the custom hitbox does not count the concave part of the hitbox (like the original post’s red line on the sprite).
(grey bg = not counted as collision)
image

But, thanks for the mention of mouse cannot use custom hitboxes.

1 Like

I use more than 1 square hit box. None concave actually.
The lower plus button. But I guess I’ll use different object as collision checking

1 Like