不能站在这里发生的事情

发布于 2025-02-03 07:37:42 字数 154 浏览 2 评论 0原文

以下是一种更新方法,有人会尝试解释一下吗

void Update()
{
    transform.Rotate((transform.rotation.eulerAngles.x+10)* Time.deltaTime , 0, 0);
}

The below is an update method, would someone take a try explaining it

void Update()
{
    transform.Rotate((transform.rotation.eulerAngles.x+10)* Time.deltaTime , 0, 0);
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

像你 2025-02-10 07:37:42

更新 -Method称为每个帧。在您的情况下,方法以异常的方式旋转游戏对象的变换。您应该操纵 eulerangles 或docs.unity3d.com/scriptreference/transform.rotate.html“ rel =“ nofollow noreferrer”>旋转给定值的变换。

the Update-Method is called every frame. In your case the method rotates the transform of the gameobject in an unusual way. You should either manipulate the eulerAngles or Rotate the transform by a given value.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文