object positioning changes after adding to container

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.

I remember being overwhelmed by containers in my game. I believe I solved it by setting anchors and decoupling children. Here’s the code:

containerCredits = display.newContainer( contentWidthSafe, yLimitBottom - display.safeScreenOriginY )
containerCredits.anchorX, containerCredits.anchorY = 0, 0
containerCredits.x, containerCredits.y = 0, display.safeScreenOriginY    containerCredits.anchorChildren = false
containerCredits.moveSpeed = 4
creditsGroup:insert(containerCredits)

You can check the full code on Github if you want. Follow the variable containerCredits.

Can you try and see if it works?

Your first bit of code is just repeating what was said in the OP and in the linked post, it doesn’t work.

jesus on the left is not part of the container; jesus on the right is part of the container (its cropping him out as it should). Problem is I want Jesus in the same position as the left, instead he keeps moving with the container. Jesus is the only text part of the container, so there’s no 3 mask limit occuring.

Can you post sample code?