Sandy 3D:利用物理原理创建房间

发布于 2024-07-09 19:34:43 字数 152 浏览 5 评论 0原文

我想知道是否有人可以帮助我开始在 Sandy 3D 中创建房间。 我知道我可以生成飞机,但我不确定如何实现简单的物理(即玩家无法穿过墙壁)。 有没有一种简单的方法可以做到这一点,或者我应该研究像WOW(Flash的3D物理引擎)这样的东西?

谢谢, 卡梅伦

I was wondering if anyone can help me get started with creating a room in Sandy 3D. I know I can generate the planes, but I am unsure as to how to implement simple physics (i.e. the player cannot walk through a wall). Is there a simple way to do this, or should I look into something like WOW (3D physics engine for Flash)?

Thanks,
Cameron

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

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

发布评论

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

评论(2

池予 2024-07-16 19:34:43

如果你只是想阻止玩家穿过墙壁,你可以考虑使用 2D Maths 来进行碰撞检测。

我用这种方法制作了一些 PaperVision 游戏,我的博客上有解释

If you just want to stop the player walking through walls, you could consider using 2D Maths to do the collision detection.

I used this method to make some PaperVision Games, explained on my blog.

打小就很酷 2024-07-16 19:34:43

如果是第一人称系统,即你是摄像机,那么只需检查从摄像机到墙壁的距离,如果距离小于你预定的人的“胖度”,则不要朝那个方向移动(即通常会向前)。
如果您使用某种头像(第二人称/第三人称系统),Shape3d 对象有一个边界框,可用于碰撞测试。

If it is a first person system, i.e. you are the camera, then just check the distans from the camera to the wall, If the distans is less than your predetermined "fatness" of your person, don't move in that direction ( that'd normaly be forward ).
If you use some kind of avatar ( second/third person system ), the Shape3d object has a bounding box, that can be used for collision testing.

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