Reading the docs for Instantiate(), I don’t think it’s clear what exactly will be the world position of the instantiated object.
It looks like the given position argument is taken as the “center” of the object.
So, if I have a ground plane, I should instantiate the object at y = (object_height) / 2
, so that the object’s bottom side is touching the ground?
When getting the object_height via a collider, I see that the prefab’s collider height is 0, and only after the instantiation it gets to be whatever is set in the editor. So I can’t use this method to calculate the object’s position y before it’s instantiated, right?
Also, how are instantiated prefab’s relative coordinates translated into the world space? I.e if the mesh in the prefab is put at Y = 5, and I call Instantiate() with position.y=0, will the world-coordinates of the mesh end up at y=5 or y=0?