The problem that the Unity model always returns to its original position after performing the action-solution

1. First check "Apply Root Motion" in the Animator component of the model , change the update mode to " Animate Physics ", and change the culling mode to " Killing Update Transformation ".

2. Set the baking action options of the original animation file.

Take the baking under the root transform rotation as an example, if checked, the effect is: the model object will not change the rotation direction with the animation

(That is, if the rotation angle of the model is (0,0,0) before starting the action, the angle will not change during the action and after the end, both are (0,0,0).

However, if you do not check the bake rotation, the model angle, collision body, etc. will change in real time with the action , (0,0,0)→(X1,Y1,Z1)→(X2,Y2,Z2)→... ...)

In other words, if you want the model to keep the state (orientation, position) at the end of the animation completely, then you should

Uncheck All Root Transform Bake . (but there will be some problems)

Conversely, if you want the position and rotation angle of the model to remain unchanged during the action, you should check all root transformation bake

(There will be a problem that the collision body always stays in place)

The root motion node is not well understood by individuals

                                               

3.       Key point : Uncheck the item " Write Default " in the animation in the animator

                                                              

4. The above method is applicable to the models and actions downloaded from mixiamo

If you use Blender to make actions with bones in pose mode, and this action involves obvious displacement and rotation , and you want to change the position value of the object according to the action in Unity in real time (mainly want to change the collision body according to the action) position, rotation, etc. )

(It seems that the rotation and scaling of the root bone in Blender will not affect the rotation and scaling values ​​of the actual object in Unity )

(Now Unity is not very friendly to Blender, materials cannot be imported directly, and animations also have some problems. So it is recommended to learn Maya and 3DMax, which are more friendly to Unity. I am also learning 3DMax)

So sorry, it seems that it can only be remade (personal understanding), the method is as follows:

[How does Blender make the correct root animation for UE Unreal_1]_Blender Character Animation Guide UE Unreal_Root Animation_RootMotion_哔哩哔哩_bilibili

I also watched this UP tutorial

Guess you like

Origin blog.csdn.net/qianhang120/article/details/126870483