object.isHitTestable

Type Boolean
Object DisplayObject
Library display.*
Revision Release 2022.3683
Keywords hit test, touchable, touches
See also object.isHitTestMasked

Overview

Allows an object to continue to receive hit events even if it is not visible. If true, objects will receive hit events regardless of visibility; if false, events are only sent to visible objects. Defaults to false.

Gotchas

This property only comes into play if the object is not visible.

Example

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