用游戏对象填充立方体并更改量表

发布于 2025-01-30 20:08:41 字数 317 浏览 2 评论 0原文

嘿,我的游戏是2D游戏(基于游戏“爆米花厨师”), 我的问题是:

我有一个正方形的边缘对撞机。形状就像是“ u”,用圆圈填充它。我有一个scipt可以在其​​中产生圆圈,但我必须将圆圈缩放。因此,他们需要在广场上更多的空间。但是在扩大规模之后:

gameObject.transform.localScale = Vector3.Lerp(minSize, maxSize, scaleSpeed * Time.deltaTime);

圆圈在广场上的左右缝隙,这太可怕了。他们应该像开水一样上升,这需要在锅中更多的空间。

谢谢!

Hey there my game is an 2d game (based on the game "Popcorn Chef"),
and my problem is:

I have a square with an edge collider arrounding it. The shape is like an 'U' for filling it up with circles. I have a scipt to spawn circles in it but I have to scale the circles up. So they need more space in the square. But after scaling up:

gameObject.transform.localScale = Vector3.Lerp(minSize, maxSize, scaleSpeed * Time.deltaTime);

the circles are glitching to the left and right out of the square and that's horrible. They should go up like boiling water, which need more space in a pot.

Thanks guys!

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文