小编Tat*_*ats的帖子

Quaternion.Lerp甚至没有移动

我想要旋转到旋转,new Quaternion(0,0,0,0);但它似乎没有动画到所需的旋转...它只是停在它的位置......

我试过的是下面的那三个

RectTransform rectTransformComponent = this.transform.GetComponent<RectTransform>(); rectTransformComponent.localRotation = Quaternion.Lerp(rectTransformComponent.localRotation, new Quaternion(0,0,0,0), 0.1f);

this.transform.localRotation = Quaternion.Lerp(this.transform.localRotation, new Quaternion(0,0,0,0), 0.1f);

this.transform.rotation = Quaternion.Lerp(this.transform.rotation, new Quaternion(0, 0, 0, 0), 0.1f);

我正在为这个对象使用RectTransform.它没有工作就行了.它在Update()中,因此它将在每一帧循环.我试图提高lerp的速度,但没有运气......

有人知道发生了什么事吗?

this.transform.localRotation = new Quaternion(0,0,0,0) //This works

c# unity-game-engine

1
推荐指数
1
解决办法
109
查看次数

标签 统计

c# ×1

unity-game-engine ×1