在应用静态主体后,A-Camera 仍然通过 a-mixin 移动

A-Camera Still moves though a-mixin after static-body has been applied

所以,我添加了框架物理 (this one),当我在 Minecraft 演示中将静态体应用于 a-mixin 体素时,我仍然可以在盒子中移动。

我的相机设置为通用控制。

这是我放置静态主体的位置:

    <a-assets>
       <a-mixin id="voxel" 
         static-body geometry="primitive: box; height: 0.6; width:0.6; 
         depth: 0.6" material="id: theImage; src: Box.jpg; color: 
         #696969; roughness: 1; metalness: 0" 
         snap="offset: 0.4 0.4 0.4; snap: 0.6 0.6 0.6">
       </a-mixin>
    </a-assets>

在使用 aframe-extras (physics-based movement section) and aframe-physics 时,如果您将相机设置在 rigkinematic-body 中:

<a-entity id="rig" movement-controls kinematic-body>
   <a-entity camera position="0 1.6 0" look-controls></a-entity>
</a-entity>

它应该与 static-bodydynamic-body 中的任何实体发生碰撞。

<a-box static-body></a-box>
<a-box dynamic-body></a-box>


- 自定义 fiddle here。动态和静态物体。
- 我的世界演示 here。如果你制作一个 3x1 的杆子,你将无法穿过它。不过,您将 "jump" 越过 2x1 方块。