- 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
![](https://koobas.hobune.stream/wayback/20220612113734im_/https://answers.unity.com/themes/thub/images/avi.jpg)