Search code examples
unity-game-enginepivotblendermodelinggameobject

Unity - Model polygon as a gameobject


I have a nice hexagonal-shaped sphere in blender. My goal in Unity is to have each hex-poly created as a separated prefab. How to do that? Im exporting fbx. file but each polygon is a separated model with default 0,0,0 transform values. In that case, all polygons are respawned in one place. Like this: Open screenshoot

if it adopts the center of a sphere as Origin, then elements in Unity are imported correctly. but each one has a Pivot shifted to the center which in turn prevents the use of the Transform class. Because it does not apply to GameObject. only measure the sphere. How to import the model that the original will have placed on the shot of each element?

Image with correct position but wrong pivot


Solution

  • Why don't you export with hierarchy? I parent all my elements to empty and it works, then try without empty and works too :)

    final_effect

    If you don't want to have hierarchy, you can export sphere with hierarchy, align all hex tiles with centers of tiles in hierarchy (maybe with script because names are the same) then remove sphere