position transformations

I have a function that outputs the positions of several points that I use to connect lines to.

Each line is its own gameobject, initially the calculation of the positions works great. But I parented all the lines together so they could be deleted all at once when they are not needed.

What happens is that the lines all appear in the correct position initially. But once the parent moves around the position of the lines gets messed up.

Since it works fine before I parented I originally thought that I needed to transform from world to local, I also tried local to world.

If Im not being clear let me try this. Before parenting, the point coordinates are fine. After parenting the point coordinates are not fine.

I’ve seen that. What I do is save off the localPosition, localRotation, and localScale of the child, then parent, then restore those things.