[Resolved] how to detect touch on one part of a background image?

How can one detect touch on one part of a background image? Is this possible in Corona SDK, or do you have to either (a) cut up the background image, or (b) perhaps put an invisible object in front of the background image at the point you’re interested in detecting the touch?
[import]uid: 140210 topic_id: 24983 reply_id: 324983[/import]

PS. I’ve tried:

a) putting an invisible object in front to detect however it doesn’t seem to detect touch when invisible

b) if I make the object have an “alpha” of 0.1 it does seem to work, however when I drop the “alpha” down to 0.0 (or 0.0001) then it doesn’t detect the touch again?
[import]uid: 140210 topic_id: 24983 reply_id: 101399[/import]

Hey Greg,

Make the object invisible then do this;

[lua]obj.isHitTestable = true[/lua]

If you do that it will register touches even though it is invisible.

(It’s what I use on all my “easter eggs” ;))

Peach :slight_smile: [import]uid: 52491 topic_id: 24983 reply_id: 101477[/import]

got it - great thanks [import]uid: 140210 topic_id: 24983 reply_id: 101480[/import]

Not a problem :slight_smile: [import]uid: 52491 topic_id: 24983 reply_id: 101541[/import]