The weirdest thing that screwed me over big time…
I tried to distill it in a very simple program to print out the stangeBounds.xMin value of a rectangle object before and after inserting it in a group:
[lua]local g = display.newGroup()
g.xOrigin = 175; g.yOrigin = 235
local r = display.newRoundedRect(0, 0, 50, 50, 0 )
print(r.stageBounds.xMin)
g:insert(r,true)
print(r.stageBounds.xMin)[/lua]
which prints out:
0
175
then we comment out the first print statement and run it again:
[lua]local g = display.newGroup()
g.xOrigin = 175; g.yOrigin = 235
local r = display.newRoundedRect(0, 0, 50, 50, 0 )
–print(r.stageBounds.xMin)
g:insert(r,true)
print(r.stageBounds.xMin)[/lua]
Now it prints out:
150
So asking for a display object’s property value, changes its value…
Now… if we use the insert without the resetTransform to true, then it will print out 175 in either case.
Unless I completely misunderstood how to use stageBounds.xMin, that feels like a very nasty bug.
I’d really appreciate it if someone could confirm this “feature” on their machine.
-FrankS.
PS. I’ve seen weird behavior with this resetTransform==true, but it is difficult to reproduce in a way that I can understand what it does and why… are there other bugs reported about this? [import]uid: 8093 topic_id: 7712 reply_id: 307712[/import]