简体   繁体   English

如何在unity中改变轴的角度?

[英]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??如何将水平顶部立方体设置为大约 27 度角??

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);如果你只需要旋转立方体:你可以使用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);例如cube1.transform.Rotate(0.0f, 0.0f, 27.0f, Space.Self);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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