Pivot point and gizmo point are different in procedural mesh even after recentering it. How to solve

Hi there, so I have been fighting against this problem for a while and didn’t find how to properly fix it. So, I have created an equilateral flat triangle via scrip (C#). Everything works fine: normal, UV mapping, etc. However, as usual, the pivot point of the triangle was in one of its vertices (it’s 0,0,0 local-scale vertice). To relocate the pivot point, I resorted to the well known idea present in this script: http://wiki.unity3d.com/index.php/SetPivot

Which pretty much means moving the mesh and the move back its vertices. It worked and now I have my equilateral triangle with the pivot point in its center. However, the gizmo for rotating or positioning the triangle in Unity’s scene editor appears in a different part of the triangle mesh, i.e. not in its center. To better illustrate it, look at the picture below:

The red triangle and the small red sphere are both positioned at 0,0,0 (world space). So, note that the triangle is being positioned via its center point. However, take a look at the Unity editor gizmo for when the triangle is selected: it appears above its center.

How can I correct that? Shouldn’t the gizmo be always located at the pivot point of the mesh?

Many thanks in advance.

There should be a button in top left which says either Pivot or Center. I think it’s supposed to be set to Pivot always. It is just the drag position, so even if you selected Center, the actual position of the object may not be where it shows the axis marker. You can confirm it by setting the object’s position to 0, 0, 0 and see that it’s centered on grid.

Other button seems Local, now slightly unsure what it did.

Hi, thanks for your answer. But there is no such a button. And as I said, the mesh is being generated during run-time, so a solution trough the inspector window would not solve the issue (the picture was taken during game being played)

This does affect the position of the object marker at runtime. Pivot shown there:

2615248--183470--pivot.png