0

-- Edit Solution : Set unity to rotate around "pivot" instead of "center".

I created an prisma in blender and exported it as .fbx into unity. In the scene Im rotating it via code and I noticed that its rotating around the wrong pivot.

The problem is that I set in blender all objects to the same origin and that should work without problems. But its not working and Im going crazy....

Why I think its the pivot - By using the rotating tool in unity I can see it with my eyes and when rotating the position of the prisma changes.

To rotate my object the right way I used - https://answers.unity.com/questions/319802/rotation-when-importing-from-blender.html

Below you can see both views (looking from top on the prisma), first from Blender, where the origin is in the center of the object and in the second image you see it in unity but the pivot is wrong/changed.

enter image description here enter image description here

Perazim
  • 1,501
  • 3
  • 19
  • 42
  • 1
    Are you sure the allignment is matching in the X,Y and Z dimensions? You could have it upside down. – Skdy Jan 08 '19 at 11:33
  • Yeah I guess. When set it up in the scene it looks the right way. I followed the step by this guy: https://answers.unity.com/questions/319802/rotation-when-importing-from-blender.html I just screenshot the objects from top to see that the pivot changed a little bit. The direction of the arrow/axis are not important in this situation – Perazim Jan 08 '19 at 12:04
  • 1
    It has been some time since I have worked with blender. But IMO you should confirm this, it can occur that u have it differently rotated towards what you might expect. Try and figure out the X,Y and Z Axis in blender and confirm for sure from values that it is correct - accordingly to Unity. Judgement by simply viewing it can be the reason for it to be overseen. :-) Else I cannot see where the issue lies – Skdy Jan 08 '19 at 12:16
  • 1
    Can you perhaps display a screenshot (like those two you have now) but from a 90 deg angle to the object? – Skdy Jan 08 '19 at 12:20
  • 3
    just guessing, did you - maybe by accident - set unity to rotate around "center" instead of "pivot"? – yes Jan 08 '19 at 12:53
  • @yes You are right o.O I never touched the tool handle, which was by default on center. Switching it on pivot fixed it... never saw/used the tool handel-buttons – Perazim Jan 08 '19 at 13:38
  • 1
    I use this plugin. https://www.blendernation.com/2017/08/29/bs-modify-pivot-add/ Moving the mesh pivot is/was a weak area in blender – Leo Bartkus Jan 08 '19 at 17:43
  • @yes u can post your answer beneath, so I can select it as the right answer – Perazim Jan 09 '19 at 14:42

1 Answers1

1

Right answer was given by the user Yes: "[...] set unity to rotate around center instead of pivot"

Perazim
  • 1,501
  • 3
  • 19
  • 42