Loss of Touch on button when groups rotate

Hi Guys

This bug can be demonstrated by running the code in the simulator, it also fails on the iPhone.

Basically if a button / object with a touch listener is part of a group thats within another group and the most outer group is rotated the button will lose the touch event at certain degrees (180 is set in the code). Its a big bug if you are rotating the screen to let the iPhone work upside down as all buttons stop working.

Sample Code, bug exists in Corona 1.1

– Hide Status Bar
display.setStatusBar(display.HiddenStatusBar)

– Interface
interfaceGroup = display.newGroup()
interfaceGroup.xReference = 160
interfaceGroup.yReference = 240

local rect1 = display.newRect( 110, 350, 100, 100 )
rect1:setFillColor(255,255,255)

– Touch Response
local function buttonAction()
rect1:setFillColor(math.random(0,255),math.random(0,255),math.random(0,255))
end

rect1:addEventListener( “touch”, buttonAction )
interfaceGroup:insert(rect1)

masterGroup = display.newGroup()
masterGroup.xReference = 160
masterGroup.yReference = 240
masterGroup:insert(interfaceGroup)

transition.to(masterGroup, { rotation=180, time=400, delay=2000 } ) [import]uid: 5354 topic_id: 640 reply_id: 300640[/import]

This is the same bug as the coordinates bug in this thread:

https://developer.anscamobile.com/forum/2010/03/23/animation-bug

The solution is really quick, and it’s fixed in current betas of Corona, and all versions going forward. [import]uid: 3007 topic_id: 640 reply_id: 1337[/import]

Ive tried this code in the 1.1.3 build and it still doesnt work as expected. You can click the square before the transition (it will change colour) but afterwards it will not register the touch event [import]uid: 5354 topic_id: 640 reply_id: 1343[/import]

I have the same problem with buttons on orientation change. Is there a fix? [import]uid: 4871 topic_id: 640 reply_id: 1649[/import]

Yeah the simulator still has issues but that should be fixed in the Friday release.

The build for iPhone option should work though as the updated the code on their servers to generate a working app. I can confirm what dosnt work in the simulator works on the iPhone (if using the current beta) [import]uid: 5354 topic_id: 640 reply_id: 1653[/import]

Hi Matt, this should be fixed in the 2.0 Beta 1 we just released. Let us know if it works for you.

walter

p.s. our goal is to release bi-weekly betas to increase the frequency of fixes/features. [import]uid: 26 topic_id: 640 reply_id: 1778[/import]

Hi Walter

Thanks for that, Evan sorted it previously in the online build.

Matt [import]uid: 5354 topic_id: 640 reply_id: 1783[/import]

I think this bug (actually two bugs) can be closed now, unless there are further problems we aren’t aware of. [import]uid: 3007 topic_id: 640 reply_id: 1999[/import]