こんにちは。いつもお世話になっております。
オブジェクトをQuaternion.Lerp()でnew Quaternion(0,0,0,0);
に持っていきたいのですが、なぜか動かずこまっています。その場所に留まってしまい、何も動かない感じです。
試したことは、下の3つです。
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を使っています。Lerpなしでは動きました。Update() でループされてるので毎フレーム呼ばれます。Lerpのスピードをいじくってみましたが、やはり動きませんでした。。。
どなたかご教授願えますでしょうか。よろしくお願いいたします。
this.transform.localRotation = new Quaternion(0,0,0,0) //これは動きます
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。