[英]Collision between camera and objects in A-Frame 1.2.0
I'm developing a game with the latest Aframe version 1.2.0 and I'm having a problem.我正在使用最新的 Aframe 版本 1.2.0 开发游戏,但遇到了问题。 How to manage collisions between the camera and objects?
如何管理相机和物体之间的碰撞? When I approach an object, I cross it.
当我接近一个物体时,我越过它。 Where other versions handled collisions, for this one I can't find anything.
其他版本处理冲突的地方,对于这个我找不到任何东西。 I've tried a lot of things but nothing works.
我尝试了很多东西,但没有任何效果。 I think I have the beginning of a solution with the aframe-physics-system.min.js library but I can only manage dynamic objects and not static objects.
我想我已经开始使用 aframe-physics-system.min.js 库解决方案,但我只能管理动态对象而不能管理静态对象。
Thank you in advance for your help !预先感谢您的帮助 !
For restricting the movements of the player/camera, it's generally recommended to use a nav mesh rather than a physics system.为了限制玩家/摄像机的移动,通常建议使用导航网格而不是物理系统。
See notes and links here:请参阅此处的注释和链接:
https://github.com/n5ro/aframe-extras/tree/master/src/misc#kinematic-body-deprecated https://github.com/n5ro/aframe-extras/tree/master/src/misc#kinematic-body-deprecated
https://www.donmccurdy.com/2017/08/20/creating-a-nav-mesh-for-a-webvr-scene/ https://www.donmccurdy.com/2017/08/20/creating-a-nav-mesh-for-a-webvr-scene/
https://github.com/donmccurdy/aframe-inspector-plugin-recasthttps://github.com/donmccurdy/aframe-inspector-plugin-recast
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.