I have rows of 2 or 3 bars (newRects) on screen which are refreshed periodically (2-10 times per second) by tracking a timer in an enterFrame listener.
Let’s say this is the top two rows:
XXXXXXXX 64% XXXXXXXX YYYYY 36 % YYYYY
XXX 15% XXX YYYYYYYYY 85% YYYYYYYYYYY
The width of the bars is calculated and set each time according to the percentages.
Next the X bars are set with a centerLeft reference point i.e (0, 0.5), the Y centerRight (1, 0.5).
Finally the X bar is set to x=0, and the Y bar x = 200 (within the group holding all the bars).
This all works absolutely fine so long as the screen is not being touched. When I touch the screen, whether or not a touch listener is involved, during the following refresh the bars are positioned wrongly, as if their reference point is (0,0), and not left or right as has been set.
Visually this means if the X bar is less than 50% it will shift right, if it is more than 50% it will shift left. On the next pass, as long as the screen is no longer being touched, things return to normal.
Any ideas what could be causing this? Touching the screen should not be having any impact on the positioning of objects.
Occurs on Corona build 2631, on OSX and xCode Simulator, Yosemite 10.10.3.