Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Discussion Unity Bone Rotation (Preserving Volume)

Discussion in 'Animation' started by shaanig03, May 14, 2024.

  1. shaanig03

    shaanig03

    Joined:
    Sep 4, 2023
    Posts:
    2
    hey fellow game devs ^_^, trying to rotate this gattling turret's barrel (on the x axis in unity), and I can, but with the mesh scaling down itself, happens in blender(modeling software) too but the software provides a feature called "Preserve Volume" which fixes that but it's a blender thing and is not in unity, I tried looking into shape keys, same result >_<, then went for googly gooing and searching and found some similar posts to mine


    and finally found someone who found a solution
    https://blenderartists.org/t/blender-to-unity-preserve-volume-mesh-deforming-problem/1113777/6

    yippy for me ^_^ except wait....

    https://blender.stackexchange.com/questions/110047/blender-to-unity-animation-volume-preservation

    the solution doesn't work properly for my case because my bones aren't joined like an arm, my barrel bones are individual bones parented to another bone, and the barrel bone rotates itself, I tried experimenting with some settings and things but no luck and here I'm posting this


    (Unity) barrel scaling down it self when rotating bone on the X axis


    (Blender), enabling preserving volume and rotation

    UPDATE: found a solution, the solution for me was I had to unassign all weights of barrels from vertex groups panel and assign the barrel weight only to the barrel bone, yippy 4 me

     
    Last edited: May 15, 2024
  2. shaanig03

    shaanig03

    Joined:
    Sep 4, 2023
    Posts:
    2
    the last picture seems to fail everytime after uploading:

    lemme upload it here:


    P.S: weird can't seem to upload the last image, seems to fail for some reason, the last gif shows enabling and disabling "Preserve Volume" and how the barrel is rotated
     
  3. mcmount

    mcmount

    Joined:
    Nov 15, 2015
    Posts:
    88
    Unity uses linear skin calculations, not quaternion. This is the reason.