Skip to content

JTriangleMesh misses some collisions #3

Description

@cobbpg

It looks like not all potential triangles are found during collision detection. If the whole mesh is put in a single cell, physics works perfectly but it is obviously very slow. Smaller the cells make the bug occur more frequently.

A quick hack to alleviate the problem is to relax the criterion to include a triangle in an octtree cell to consider only the bounding box of the triangle for overlap:

JOctree.prototype.doesTriangleIntersectCell = function(triangle, cell)
{
    return triangle.get_boundingBox().overlapTest(cell.AABox);
}

Note that this does not get rid of the bug entirely, but at least gives some hints about its origins.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions