collinhover / impactplusplus

Impact++ is a collection of additions to ImpactJS with full featured physics, dynamic lighting, UI, abilities, and more.
http://collinhover.github.com/impactplusplus
MIT License
276 stars 58 forks source link

UIButtons don't take into account scale for the clickable area. #144

Closed lamphj closed 10 years ago

lamphj commented 10 years ago

utilsintersection.entitiesInAABB checks intersection by size, but doesn't take into account the scale of the entity. This causes large buttons to only register taps in the top left corner while the bottom right corner is ignored. This commit fixes the issue by multiplying entity size by the entity's scaleMod. That way the entire button's surface is now clickable.

collinhover commented 10 years ago

Very cool, thanks for fixing this!