Unity-Animator深入系列---deltaPosition&deltaRotation

回到 Animator深入系列总目录

 

 

官方文档给出的信息非常含糊

Gets the avatar delta position for the last evaluated frame.

 

测试了一下,首先必须是含有根运动的动画,才会得到DeltaPosition/DeltaRotation的值,这个值是相对于上一帧的根运动位置

并且非人形动画也可以获得该值

对于修改根骨骼位移RootMotion,会用到这两个参数,可以看这篇:http://www.cnblogs.com/hont/p/5351275.html

该值不可修改,不受StateMachineBehaviour影响 

 

测试用脚本

public Animator animator;

void Update()
{
    Debug.Log("deltaPosition: " + animator.deltaPosition+" deltaRotation(euler): "+animator.deltaRotation.eulerAngles);
}

 

 

Animator正常速度下测试结果

 

 

Animator二十倍速度下测试结果

 

posted @ 2015-12-29 17:52  HONT  阅读(4590)  评论(0编辑  收藏  举报