需求实现慢动作,然后在代码里设置了speed,动画播放速度,没起到作用。直接在编辑器里设置播放速度正常的,在代码里不行
this._animationComponent.clips[0].speed=3;
直接找到api发现没用,
后来发现这个方法才有用 this._animationComponent.getState(“Ar|Run”).speed=3;
1赞
是的,要运行时改变速度应该改变 AnimationState.speed,AnimationClip.speed 是初始化 AnimationState.speed 用的。
1赞