Sign in to follow this  

Why does the mesh impostor only collides with spheres?

Recommended Posts

Why ?

var rawVerts = object.getVerticesData ? object.getVerticesData(BABYLON.VertexBuffer.PositionKind) : [];
var rawFaces = object.getIndices ? object.getIndices() : [];
BABYLON.Tools.Warn("MeshImpostor only collides against spheres.");
returnValue = new CANNON.Trimesh(rawVerts, rawFaces);

Even tho CannonJS supports mesh/plane collision ? :

  Demo :

 Source :

            // ground plane
            var groundShape = new CANNON.Plane();
            var groundBody = new CANNON.Body({
                mass: 0,
                position: new CANNON.Vec3(0,0,-5)


Edit: Ok, I overlooked the fact that the Mesh impostor is infact a  Trimesh shape ( So can you add ConvexPolyhedron shapes in the next release please ?

Share this post

Link to post
Share on other sites

Because of how aabb works, fastest method is to test with a circle (and simplest)..


your not not going to get any additions to physics unless you program it yourself, or wait for one of the power players to release a new physics engine.

Share this post

Link to post
Share on other sites

MeshImpostor is, indeed, a TriMesh.

I can add a ConvexPolyhedron, but it might take a bit of time.

We had it already, BUT  it wasn't calculated correctly on our side, and people didn't really understand how to use it. I will add it to my todo list. Which is as long as the Israeli-Palestinian conflict.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.