A-Frame combining physics character with vps in 8th wall

44 Views Asked by At

I am trying to run the physics character in a real-world environment, however the character gets stuck to the room’s mesh instead of connecting with the room environment. How do i get it connected to vps instead of its mesh? This is the code snippet

<a-assets>
    <!-- download the mesh from the geospatial browser and add it here -->
    <a-asset-item id="vps-mesh" src="./assets/6d3f6ede8fdb.glb"></a-asset-item>
    <a-asset-item id="character-model" src="./assets/character-model.glb"></a-asset-item>
    <!-- if you have a prebaked animation that interacts with the mesh, add it here -->
    <a-asset-item id="vps-anim" src=""></a-asset-item>
  </a-assets>


 <a-entity named-wayspot="name: 6d3f6ede8fdb">
    <!-- apply hider material to the mesh to realistically occlude content -->
    <a-entity gltf-model="#vps-mesh" hider-material></a-entity>
    <!-- apply shadow shader to the mesh to realistically receive shadows -->
    <a-entity gltf-model="#vps-mesh" shadow-shader shadow="cast: false"></a-entity>
    <!-- add content here; either prebaked or realtime animations -->
    <!-- play-vps-animation waits for successful localization to begin the animation -->
    <a-entity gltf-model="#vps-anim" play-vps-animation shadow="receive: false"></a-entity>
  </a-entity>


<a-cylinder
    id="character"
    joystick-controller
    jump-controller
    position="0 5 0"
    height="2"
    material="transparent: true; opacity: 0; depthTest: false"
    ammo-body="type: dynamic; mass: 100; angularFactor: 0 0 0"
    ammo-shape="type: capsule">
    <!-- aniamted character -->
    <a-entity
      id="characterModel"
      gltf-model="#character-model"
      position="0 0 0"
      scale=".5 .5 .5"
      no-cull
      shadow></a-entity>
     
    <!-- raycaster -->
    
     
  </a-cylinder>
    <a-entity class="ground" gltf-model="#vps-mesh" scale="1 1 1" physics-object shadow></a-entity>


I tried to combine the physics character controller with the real-world mesh but it is not working

0

There are 0 best solutions below