Setting an invisible object.isHitTestable = true causes it to become visible

If you set an object to have .isVisible = false and then set the same object to have .isHitTestable = true, the object becomes visible again which defeats the purpose of having .isHitTestable as a property in the first place.

Taking this example straight from the API reference docs:

local circle = display.newCircle(100, 100, 50)  
circle:setFillColor(255, 0, 0)  
circle.isVisible = false  
circle.isHitTestable = true  

The circle is drawn even though circle.isVisible = false. It happens with both vector objects and images, in the simulator and on the device.

[import]uid: 9064 topic_id: 4146 reply_id: 304146[/import]

didn’t know that. will check later. but yes that shouldn’t happen according to Ansca’s previous post on this.

my workaround for now is to set the alpha to 0.01, it’s low enough to be invisible but because it’s not zero Corona doesn’t disable the object.

However, presumably it will be included in the render time whereas if isVisible=false, it isn’t

j
[import]uid: 6645 topic_id: 4146 reply_id: 12878[/import]

Confirm that bug. Setting alpha to 0.01 or even to 0.0 doesn’t allowably, as it hits the performance.

To Ansca Staff: Please fix it, because it makes isHitTestable field useless. [import]uid: 7301 topic_id: 4146 reply_id: 14886[/import]