A-frame: How to setup wall colliders

点点圈 提交于 2019-12-07 11:41:45

问题


Can anyone tell me how to setup wall colliders? I have setup a room using OBJ files for the walls. Many thanks.


回答1:


Take a look at the source code for Don McCurdy's "Walls" example: https://sandbox.donmccurdy.com/vr/walls/

Note the addition of the physics component in the a-scene element. This is what gets the magic going.

You need to include the aframe-extras script along with aframe.




回答2:


kinematic-body.js is deprecated. Don McCurdy encourages the use of teleportation See this post too: Move camera in aframe with physics engine



来源:https://stackoverflow.com/questions/40625998/a-frame-how-to-setup-wall-colliders

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!