- Home /
Question by
OpenShift · Mar 24, 2017 at 07:51 PM ·
rotateworldspacerotatetowards
RotateTowards & Space.World
Hi guys. I want you to turn the cube to the targeted angle. But as you will turn every angle, the concept of "Space.World" is confused. How can I integrate "Space.World" into the "RotateToward" function.
I need to use "localPosition & eulerAngles" in code ?
etc:
targetRotate = new Vector3(0,180,0);
transform.rotation = Quaternion.RotateTowards (getRotate (), Quaternion.Euler (targetRotate), rotateTime * Time.deltaTime);
Comment
Your answer