You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, Sprite picking works just fine, until you start using the sprite's optional rect property.
The rect is used in many cases, one of the most popular being getting individual frames from a spritesheet.
This results in the sprite rect and therefore the size of the actual sprite being much smaller than the bounds (that cover the whole sheet).
Since bevy_mod_picking only considers the sprite's bounds, then the sprite's actual picking zone is much bigger than it should be, rendering it unusable in many situations.
What I propose is that the bevy_mod_picking instead looks at both the bounds and the rect to determine what area is actually the sprite.
PS: I understand this might not be possible and there might be edge cases or other factors i'm not seeing. There might also be some fix/solution i'm not aware of.
The text was updated successfully, but these errors were encountered:
Right now, Sprite picking works just fine, until you start using the sprite's optional rect property.
The rect is used in many cases, one of the most popular being getting individual frames from a spritesheet.
This results in the sprite rect and therefore the size of the actual sprite being much smaller than the bounds (that cover the whole sheet).
Since bevy_mod_picking only considers the sprite's bounds, then the sprite's actual picking zone is much bigger than it should be, rendering it unusable in many situations.
What I propose is that the bevy_mod_picking instead looks at both the bounds and the rect to determine what area is actually the sprite.
PS: I understand this might not be possible and there might be edge cases or other factors i'm not seeing. There might also be some fix/solution i'm not aware of.
The text was updated successfully, but these errors were encountered: