Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Invisible Sprite elements are still considered part of the parent sprites bounding box. — Gideros Forum

Invisible Sprite elements are still considered part of the parent sprites bounding box.

techdojotechdojo Guru
edited September 2012 in General questions
I'm not sure if this is a bug or a "feature".

But if you have a parent sprite with several children, the sprites width and height reflect the extent of ALL of the children, even if one or more of them has been "hidden" with Sprite:setVisible(false) - and as such can lead to confusion with positioning, touch events (especially if you use Sprite:hitTestPoint() ) etc.

I haven't tried it yet with Sprite:getBounds() so I don't know if that exhibits the same "issue"

Personally I'd say it was a bug - but there might be a good reason why they are included, anybody care to shed some light on the issue?
WhiteTree Games - Home, home on the web, where the bits and bytes they do play!
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill

Comments

Sign In or Register to comment.