Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Complex character (torso+legs) with different weapons.

Discussion in '2D' started by JaimeDominguez, Feb 6, 2019.

  1. JaimeDominguez

    JaimeDominguez

    Joined:
    Jan 11, 2019
    Posts:
    4
    Hello,

    We are making a really cool 2d game with tons of animations but I would like to have for the main character legs + torso + weapons.

    I have thought of weapons being a placeholder with positioning and replacing the sprite by code, then rotation and scale by animation (if a sword to emit particles) or change its colour in some moments.

    I would have to position this place holder every frame of the torso animation I'm aware of that.

    The problem comes when the character jumps or crouch, the height of the legs will change and that is what I am not sure who to do it.

    Do I need to place some kind of pivot point and attach torso and legs to it? So imagine some common point right in the belly of the character.

    I don't know, what do you think could be best? Any experiences in this area??
     
  2. TheHammer1

    TheHammer1

    Joined:
    Oct 15, 2015
    Posts:
    25
    We need a little more information to help you. Are you using the Unity Animator? If so, the leg height might have been accidentally changed there. It also appears you are using bone animation, correct me if I'm wrong. I don't believe the leg height has something to do with the pivot point though.

    For now I can only suggest that the leg height could be 1. accidentally changed in the code 2. or in the animator. I don't really have too much experience with the animator (I really hate animation) so I can't give you exact information.

    Anyways, good luck!
     
  3. JaimeDominguez

    JaimeDominguez

    Joined:
    Jan 11, 2019
    Posts:
    4
    Hello TheHammer1,

    No I'm only using animations by spritesheets. Both legs belong to the same sprite. But also the torso and arms belong to other sprite.
    But legs sprite can be smaller if the player crouches or jumps.