Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Help with Bone/Mesh Structure and Independent Control

Discussion in 'Animation' started by DRRosen3, Sep 20, 2021.

  1. DRRosen3

    DRRosen3

    Joined:
    Jan 30, 2014
    Posts:
    683
    So we've been at this for a couple of months now, and so far we haven't had any luck with any of the methods that we've prototyped out. So, I'm finally caving, and reaching out for some input.

    What we're trying to achieve: We're trying to have it so that our character model, which is bi-pedal, has the ability to have animations on it; but have its upper-body's rotation be driven by the player's input.

    What's going wrong: Several things... If we try using a standard mesh/rig setup (where the entire mesh is parented to a single rig), then the bones for the upper-body are driven by their animation state. We've tried to override this via LateUpdate, but the problem is that we're building a multiplayer game using Photon. We tried to attach a PhotonTransformView to the upper-body so that all players will have the correct upper-body rotation for all other players. The problem is that PhotonTransformView sends and receives updates within the Update method (as is how it works with all PUN messages), so anything sent from LateUpdate is already outdated and being overrode.

    We have also just taken a shot at separating the upper-body so that it is its own mesh, and doing away with all animations on the upper-body. With this method we tried to have both the upper-body and lower-body be children of an empty game object; and also tried to have the upper-body simply be a child of the lower-body. However, the problem in both cases goes back to the animations. If the lower-body goes into a crouched position (i.e. preparing for a jump), then the upper-body doesn't follow and the two parts become detached.

    Effectively what we're trying to have is something akin to MechWarrior. By the way all of this is using the Animator (not Animation).
     
  2. DRRosen3

    DRRosen3

    Joined:
    Jan 30, 2014
    Posts:
    683
    BUMP

    Update. We've also given a try at removing the character's "spine's" rotation property from all animations so that nothing is trying to drive the rotation of that bone, except for the code. This still doesn't work. The bone (despite not having any animation ties) still does not rotate, if animations are playing.