Jump to content

[solved] blender mesh rotation in unity


Recommended Posts

Hi,

I'm using blender to create the meshes for my parts. Blender uses a different coordinate system (z is up/down, x is left/right and y is front/back) than unity (y is up/down, z is left/right and x is front/back). When I import my objects into unity, this results in some weird behavior. In the assets screen, the preview of the blender-import as a whole has the correct rotation, but the individual meshes do not. They are being rotated, such that their bottom is now pointing to the side. When I add a mesh to the scene, it is rotated correctly again.

When I have finished all of the preparations and exported the part to be used in KSP, it is rotated the same way the meshes inside of the blender-import are. I suppose there must be a rather simple fix for this somewhere, but I couldn't find it. It be nice if there were some way to automate the correction.

Cyclonit

Edited by Cyclonit
Added [solved] tag to title.
Link to comment
Share on other sites

Thanks to Greys from the #KSPModders channel over on esper, I was able to resolve the issue. This is the solution:

The PartTools script will always use the rotation of the object is has been added to. This means, if you use the PartTools directly onto an object, which has been imported from blender, the change in coordinate systems will screw up the mesh's rotation ingame. To avoid this, you simply add an empty GameObject to the scene (GameObject -> Create Empty), put your model inside of this GameObject and add the PartTools to the GameObject instead of adding them directly to the model. In my case, the menus look like this:

image.png

image.png

Edited by Cyclonit
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...