【发布时间】:2014-07-01 15:37:39
【问题描述】:
我正在尝试使用 lerp 命令旋转游戏对象,但出现以下错误:
错误 CS0029:无法隐式转换类型
float' toUnityEngine.Quaternion'
这是我正在使用的代码
box.rotation = Quaternion.AngleAxis(NewAngle, Vector3.right);
boxAngle = box.rotation.x;
targetAngle = 90.0f;
NewAngle = Mathf.Lerp(boxAngle, targetAngle, smooth * Time.deltaTime);
谁能指出我正确的方向?我做错了什么?
【问题讨论】:
-
四分之一不是旋转。使用向量3
标签: rotation unity3d quaternions