我希望您将立方体转到目标角度。但是,随着你将转向各个角度," Space.World"很困惑。我如何整合" Space.World"进入" RotateToward"功能
我需要使用" localPosition&为:eulerAngles"在代码?
等:
targetRotate = new Vector3(0,180,0);
transform.rotation = Quaternion.RotateTowards (getRotate (), Quaternion.Euler (targetRotate), rotateTime * Time.deltaTime);