localPosition not where expected

Hey guy,
i have some problems with transform.localPosition as it is not where i thought where it should be.

Basically i try to get the x and y of sphere relativ to its parent which is a plane.

The position of the sphere is updated every time a raycast hits the plane to exact this point.

But if i try to get the localPosition of the sphere, i get a point somewhere beneath the plane.

I really don’t get why there is that some kind of offset. Is it possible that it has something to do with the scaling of of the plane or is it a problem to set the sphere to the raycasthit.point?

I don’t really know if it’s really a smart solution or more something like workaround, but that is how i managed work with it.

The first thing i realized, when i opened my obj 3d model in cinema again, was that all center point of all object parts where set to the document origin. That was exactly the „actual origin“ in the screenshot above (maybe something special from .obj?)

Exporting to .fbx solved that, all center points where exactly centered at all objects again.

Because the transform.localPosition gave me only „0.01“ like values and therefore nothing like expected i did a simple vector geometric operation to get the relativ position from the spheres to their plane with absolute values.

relativePosition = sphere.transform.position - plane.transform.position;

This was just possible because i got the correct absolute values.

I don’t no know if that’s a good way to go, but it works…