I am trying to create an object and then create multiple smaller objects inside it.
The parent object has the global coordinates of 0,0,0. The first child also has the coordinates 0,0,0 and the other children are offset from those. The problem arises after I use the SetParent() method WITH worldPositionStays "true".
Here is the console output:
Global position before parent: x:0, y:0, z:0
Local position before parent: x:0, y:0, z:0
Global position after parent: x:4,470348E-08, y:0, z:1,192093E-07
Local position after parent: x:-6,34092E-09, y:0, z:1,5
Why is this happening? Shouldn't the global position be the same regardless? How can I fix this as it happens with all children of that object? Thanks in advance.
Quick edit: All children appear where they should within the parent object. I just need the coordinates to match up with the ones I set them to be before assigning them to the parent.