Is a physics engine useful?

how did you put the cube? Did you merge it with the pre-existing geometries or just added it in to the scene? It is the latter it won’t work unless you merge it!

You can share your code

In your example code I was able to add a cube to the loaded GLTF scene and it displays, so far so good.

    var boxGeometry = new THREE.BoxGeometry(4, 10, 4); 
    sphereMaterial = new THREE.MeshBasicMaterial({ color: 0xff0000, wireframe: true  });   
    var xplayer = new THREE.Mesh(boxGeometry, sphereMaterial);
    xplayer.position.x = 25; 

I then changed the material of the debug navmesh to wireframe and see it ignores the columns etc when creating the mesh, there are no holes around non ‘floor’ geometry. I wonder if this is because the navmesh plugin and debug mesh creation is inside the traverse function, creating multiple RecastJSPlugins and debug navmeshes.

Just like i said you need to merge the new cube geometry with the pre-existing geometries. Make sure it is a buffer geometry.


Why that’s just excellent, much appreciated. I may be an errr old-school threejs developer and have not really embraced buffered geometry since it appear threejs is doing it for me. More to learn. When my game is developed enough you will certainly get a big mention.

1 Like

wish you luck :smiley: