Now when you click Play▶ you will notice that the animation looks a lot better. Next, open the Animator component by double-clicking on the Animator Controller → click on the layer setting button ⚙️ of the Base Layer and select the mask we just created.You can rename it as UpperBodyAvatarMask → select the Humanoid drop-down and deselect the upper body by clicking on it.In the Project window, right-click and select Create → Avatar Mask.Now, to stop the animation from affecting the upper body: One is to stop the walking animation from affecting the upper body and the other is to stop the leg from passing through, which we will address in the next section. The upper body moves a lot more than required.The upper body still has IK and works with the controller.Now if you hit Play and observe what happens, you will notice that: In the Animator component of the Avatar GameObject, select MaleAnimationTargetV2Avatar or FemaleAnimationTargetV2Avatar as the parameter for the variable Avatar.Open the model to view its children → from the Hierarchy select the Avatar GameObject → drag and drop the Walking animation in the inspector window.In the Project window, navigate to Assets → Plugin → Wolf3D Ready Player Me SDK → Resources → Animations → you can choose Male or Female → select the model or model as per your choice.But, the Ready Player Me avatar comes along with walking animation. Generally, to animate the legs we need to download the animation separately and add it to the avatar. But, since most people (like me) don’t have them we would like to propose a different solution: Downloading or creating animation for the lower body and playing them whenever the user moves. The VR hands are tracked using the two controllers, to animate the legs using real-time tracking, you would need additional trackers. In this blog post, we’ll learn how the lower body can be animated. If you haven’t checked out the first part of this series, we highly recommend checking it out, since the skills and knowledge from it are required here as well. Previously we learned how we could create our own Avatar on the Ready Player Me website, import it into Unity and animate the upper body with the help of inverse kinematics.
0 Comments
Leave a Reply. |