My code generated mesh puts its transform in a very inconvenient location and I would like to Set its location to that of its parent. (For some reason the parent takes on the transform of its child when this particular mesh is set as a child of it.)
So I want to relocate the transform to be that of the parent.
transform.translate() seems to be a function that will allow me to move the transform. The problem is that the coded mesh could be any size or shape depending on properties. And transform.translate only allows me to move the transform in relation to something. I cant simply just set a vector3 location to it. Because of this, the tranform will be in a different position depending on the size and shape of the object.
Anyway to modify the transform to directly give it a location?
Ideally Im looking for something along the lines of transform.location = parent.position;
To be clear, by transform, Im talking about the location relative to an object that is recognized as its “center of gravity”
Edit: What most suggest as the best way to accomplish this is to just parent the mesh and rotate the parent, However The parents pivot point gets modified as well. I have never seen this before.