goplus / spx

spx - A Scratch Compatible Go/Go+ 2D Game Engine for STEM education
https://builder.goplus.org
Apache License 2.0
100 stars 28 forks source link

Click-capture issue with sprite pivot #297

Closed nighca closed 2 months ago

nighca commented 2 months ago

There is issue with click on a sprite with pivot.

For example, in this project, we configured the sprite with:

{
  "pivot": {
    "x": 45,
    "y": -70
  },
}

Which uses the sprite's center point as its pivot.

The click event is not triggered if we click at most of the area of the sprite. It is triggered only when we click at the right-bottom part of the sprite.

https://github.com/goplus/spx/assets/1492263/f1daae38-f141-49b6-a9f6-20855efbbbf2