askvity

How do you rotate an armature in Unity?

Published in Unity Armature 3 mins read

Rotating an armature (skeleton) in Unity involves manipulating its transform, often to correct orientation issues or achieve specific poses. Here's a breakdown of a common method for correcting armature rotation, based on the provided reference and standard Unity practices.

Here's the process:

  1. Parenting the Mesh to the Armature (if needed): Ensure your mesh is parented to the armature. This will ensure the mesh follows the armature's transformations. If it isn't already, drag the mesh object onto the armature object in the Hierarchy window.

  2. Clearing and Keeping Transform: Select the mesh, then Shift select the armature. Right-click and choose "Parent > Clear and Keep Transform." This detaches the mesh from the armature while maintaining its current position, rotation, and scale in the world. This is a crucial step because it allows you to adjust the mesh's local rotation without affecting the armature's current orientation.

  3. Rotating the Mesh: With the mesh still selected, rotate it on the X-axis, typically by -90° or another value as needed. You can do this using the Rotation tool in the Scene view or by manually entering the rotation values in the Inspector window.

  4. Applying the Rotation: After rotating the mesh, select "GameObject > Apply > Rotation" from the Unity menu. This bakes the rotation into the mesh's local transform, making it the new "default" rotation.

  5. Reparenting (if initially parented): If the mesh was initially parented to the armature, re-parent it by dragging the mesh back onto the armature object in the Hierarchy. This restores the hierarchical relationship.

Why this works:

This method separates the mesh from the armature temporarily. By clearing the parent and keeping the transform, you're able to modify the mesh's local rotation without the armature's rotation affecting it. Applying the rotation then permanently changes the mesh's orientation. Reparenting then ensures the mesh follows the armature again, but with the corrected initial rotation.

Important Considerations:

  • Animation Impacts: Be mindful that rotating the armature after applying changes may affect existing animations that rely on the original armature orientation. Test your animations thoroughly after making changes.
  • Import Settings: If the rotation issue originates during import, consider adjusting the import settings for the model (e.g., rotation on import). This can prevent the need for manual correction within the Unity scene.
  • Alternative Methods: Other methods for adjusting armature orientation involve directly manipulating the armature's rotation in the Inspector, but this can be trickier and may impact existing animations more significantly.

Related Articles