Forum Discussion

Oloap.92's avatar
Oloap.92
Protege
11 months ago
Solved

Meta Avatar v.29 Animation Locomotion

Hi all,

I'm using the latest avatar SDK and I want to set up a local third person avatar with animated legs. I looked at the NetworkLoopbackExample sample scene, so I added the OVR Animation Behaviour script to the local avatar. However, the legs don't animate, they just stay still.
Is there a way to make them move?
Thanks in advance for any help.

 

  • Oloap.92's avatar
    Oloap.92
    8 months ago

    Hi thanks for replying. 
    The issue solved only by updating to the last avatar version v35.

18 Replies

  • The legs should be moving when you move your headset. The behavior is coded to activate the animation when the headset is in motion.

    I'm looking for a solution to activate the leg animation when moving the avatar with my controller with continuous motion. I haven't found any solution yet and it's not part of the Meta Building Block.  

  • Hi, the local avatar's legs don't move even if I move the headset. They are like frozen, the feet aren't planted on the floor.

    • bk_brainiac's avatar
      bk_brainiac
      Protege

      I have the same issue. The local avatar's leg do not move. I guess they are not supposed to move - only when viewed as a remove avatar.

      • Oloap.92's avatar
        Oloap.92
        Protege

        Yeah, I think so too. I hope they fix it soon.

        By chance, did you try to integrate the avatar editor as well?

  • Usually local avatars are not rendered in full body mode so I'm not sure why the new SDK is rendering them that way now.

    No i haven't integrated the editor yet. I'm trying to figure out how to integrate animation with controller locomotion.

    • Oloap.92's avatar
      Oloap.92
      Protege

      Yeah, I agree. They made things more complicated then before. I'll inform you if I find anything useful about the locomotion. Thanks for your help.

  • Hey not sure if you made any progress on this. I figured out how to animate the legs. There is a controller MecanimLegsAnimationController that is attached to the animation rig of the local avatar.

    If you set the useOverideParameters property to true and the set the motion and speed, you can control the movement of the legs of the avatar on demand - such as when using the controller.

    mecanimLegsAnimationController._moveSpeedOverride = 0.1f;
    mecanimLegsAnimationController._movementParameterOverride = MecanimLegsAnimationController.MovementParameter.MoveForward;
    mecanimLegsAnimationController._useOverrideParameters = true; 

    This will get sent to the remote avatar and the avatar's legs to appear in motion.

    • Oloap.92's avatar
      Oloap.92
      Protege

      Hi thanks for replying. 
      The issue solved only by updating to the last avatar version v35.

    • KuRiTef's avatar
      KuRiTef
      Honored Guest

      Hi! I have tried the useOverideParameters but legs are not moving. It works when moving the headset but I cannot make it walk when using the controller because the override is ignoring every param I try.

      Am I missing something? Thanks!

      • bk_brainiac's avatar
        bk_brainiac
        Protege

        Hi KuRiTef

        Are you setting values for the other properties? 

        mecanimLegsAnimationController._moveSpeedOverride = 0.1f;
        mecanimLegsAnimationController._movementParameterOverride = MecanimLegsAnimationController.MovementParameter.MoveForward;
        mecanimLegsAnimationController._useOverrideParameters = true; 

        Also make sure that you are getting the MecanimLegsAnimationController from the local avatar.

        mecanimLegsAnimationController = localAvatar.GetComponentInChildren<MecanimLegsAnimationController>();

  • You can override the legs animation via MecanimLegsAnimationController.cs 

  • Then you have some other issue going on. I am using the NetworkAvatar building block. I haven't made any changes to the building block nor the FusionAvatar prefabs that comes with it.

  • Thanks Sabatony98! Yes that needs to be enabled too.

    Has anyone figured out the proper height of the avatar? Now that the avatar has legs sometimes the legs render down through the floor or above the floor depending on the height of the player's chair (or if the player is standing). I'm trying to find a solution that doesn't require the player to adjust the height manually through the settings (if possible)

    Fokis 

    • Sabatony98's avatar
      Sabatony98
      Explorer

      For that there are basically two things.

      First, agian on the OVRAvatarAnimationBehaviour you can unfold Mixed Reality Animation Options and select "Anchor to Headset Dynamic Crouching" and if you want to adjust the height you can call RecalibrateStandingHeight() on the MecanimLegsAnimationController. This will effectively set the current height of the HMD above the floor to the user height...but this requires the user to stand up to work correctly.

      Also if you enable the crouching and start while sitting down, your avatar will not crouch automatically. There is a value (i think also on the leg controller) CrouchStartThreshold which defines how far you have to move below the initial head height to trigger the crouching behaviour

  • KuRiTef's avatar
    KuRiTef
    Honored Guest

    Hi again! I have noticed that when the app is running there is a constant warning:

    "Animator is not playing an AnimatorController"

    When I add the MecanimLegsAnimationController and run the app, it tells me it needs an Animator. Then I add the animator and get this constant warning. What controller should I add to that Animator? 

    If I create an empty one, then it shows a lot of messages of missing params...

    Thanks

  • KuRiTef's avatar
    KuRiTef
    Honored Guest

    OK, Solved! Just for next beginners like me, you DON'T have to add the MecanimLegsAnimationController Script manually! It is just automatically added to the OvrAvatarAnimationBehaviour on runtime.

    So you just have to change the params there, in the original animation behaviour script 😄

→ Find helpful resources to begin your development journey in Getting Started

→ Get the latest information about HorizonOS development in News & Announcements.

→ Access Start program mentor videos and share knowledge, tutorials, and videos in Community Resources.

→ Get support or provide help in Questions & Discussions.

→ Show off your work in What I’m Building to get feedback and find playtesters.

→ Looking for documentation?  Developer Docs

→ Looking for account support?  Support Center

→ Looking for the previous forum?  Forum Archive

→ Looking to join the Start program? Apply here.

 

Recent Discussions