I don’t understand the positioning of objects once they are added to containers. How do I make the object position stay the same it was b4 it’s added to the container?
--given a screensize of 320 x 180 and you want a container covering the area
group_container=display.newContainer(320,180)
group_container.x=320/2; group_container.y=180/2 --so the container is now centered onscreen instead of from 0,0
Once you add an object it flies all over the place:
local text= display.newText("helloWorld",0,0)
group_container:insert(text) --text,true only brings it closer to the origin of the container if text.x=400 or something
I shouldn’t have to set an object where I want it, add it to a container for a mask, and then have to set the entire object position again this time based on the container offset. I don’t know why the docs keep pushing for you to use translate either, that just makes it worse cause now you have an offset that requires a second set of x/y position to be grabbed via the gameloop which is ridiculous to micro two sets of x,y for every object…I don’t want to make updates to one and then have to update the other relative to it each time nor have two sets continuously updating for the sake of staying relative to eachother.
Similar to : Help with positioning objects / container control - #5 by ToeKnee no solutions there either…fooling around with anchors and anchorChilren=false didn’t do a thing.