Search Unity

Crouching offset y position

Discussion in '2D' started by hasen, Apr 22, 2015.

  1. hasen

    hasen

    Joined:
    Apr 1, 2015
    Posts:
    29
    When my character crouches it centres him in the middle so he seems to float in the air. How can I offset his Y position in mecanim when crouch is activated?
     
  2. Kuan

    Kuan

    Unity Technologies

    Joined:
    Jul 2, 2014
    Posts:
    87
    I am guessing you're using sprite sheet animation and your crouch frame is smaller than the rest, you may try to set all the sprite frame pivot to bottom in sprite editor.

    If my assumption is incorrect, mind elaborate your problem?
     
  3. hasen

    hasen

    Joined:
    Apr 1, 2015
    Posts:
    29
    Yes I managed to fix it by making all the sprites inside fixed box sizes rather than cutting them up into their actual sizes. Thanks for your input. Out of interest though, can you not offset Y and X positions in Mecanim? It seems it would make sense to be able to.