简体   繁体   中英

How to change the angle of the the axis in the unity?

请检查这张图片

How can i put that upper cube to the every top of the vertical cube? how to set that horizontal top cube to around 27deg angle??

I don't know if I understood your question. If you just need to rotate the cube: you can use Rotate(float xAngle, float yAngle, float zAngle, Space relativeTo = Space.Self); so for example cube1.transform.Rotate(0.0f, 0.0f, 27.0f, Space.Self);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM