Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Character position bugging with Animation Rigging

Discussion in 'Animation' started by potato_dev, Jul 9, 2021.

  1. potato_dev

    potato_dev

    Joined:
    Jun 4, 2020
    Posts:
    2
    So, I am developing a Third Person Shooter using Animation Rigging which the character must grab the weapon and aim according the camera center. I followed video tutorials of aiming with animation rigging, but on my first step, which is setting the right hand on the weapon, is returning me a flying character on runtime.

    On inspector there is no change on position.y in any object. but as you can see in the screenshot, I have my character in a different position on Y.
    No matter the type of the rig I set up or the hierarchy of the source object target, I get this result on runtime.

    Some settings:
    - "Banana Man" has Animator and Rig Builder with "RigLayer_HandIK" added as Rig Layer
    - "Armature" is the skeleton of the character
    - "Weapon" is a child of "Banana Man" and don't have components
    - "RigLayers" don't have components
    - "RigLayer_HandIK" has component Rig
    - "Right Hand IK" has Two Bone Constraint
    - I don't have any collider inside "Weapon", just mesh filters and mesh renderers

    I don't have any GameObjects with same name inside "Banana Man".
    Without setting "Weapon" as source target on Two Bone IK Constraint, my character act normal. I tried with an empty animation, but I have the same result.

    Could someone explain what I am doing wrong?
     

    Attached Files:

    Last edited: Jul 10, 2021
  2. potato_dev

    potato_dev

    Joined:
    Jun 4, 2020
    Posts:
    2
    So, I tried to change the character model (the skeleton and the meshes) and I finally get what I wanted. So the problem was related to the model.
     
  3. girguy101

    girguy101

    Joined:
    Dec 11, 2022
    Posts:
    3
    i dont understand the solution. please document better