I expect the gizmo to appear at (10, 0, 10), because that’s where my quad vertices are centered around.
But the gizmo appears at (0, 0, 0) instead.
No matter what I try with setPivotPoint() or other methods, the gizmo always sticks to the mesh’s local origin.
My understanding:
Since the vertices were placed around (10,0,10) in world space,
I thought the local origin (0,0,0) of the mesh would correspond to world (10,0,10).
Apparently that’s not the case.
My questions:
Why is the mesh’s local origin still at (0,0,0) in world coordinates after setting VertexData manually?
How can I move the local origin or re-center the pivot so that the gizmo is correctly placed at the visual center (10,0,10)?
Is there a built-in method to “center the mesh” based on its bounding box or vertex positions?
Any help would be greatly appreciated!
Thank you for your support and for this amazing engine.
It is two different properties. You have vertex data and you have a position vector. They are independent. There is no “origin” property. “Origin” or “visual center” is a human concept, here.
If you want a plane mesh centered at 10,0,10, just create it with MeshBuilder and set its position.