Skip to content

Collisions not working consistently with convex polyhedrons #200

Open
@henryegloff

Description

I have been developing a third person physics based game demo / prototype. - You can checkout the latest progress at: [https://unfinished-robot-game.vercel.app]

The problem I have is that if you direct the player to jump straight towards an icosahedron shaped object or say a dodecahedron object, every now and then the player passes straight into the object, like the collision hasn’t quite caught properly. This happens when say the icosahedron is both static or dynamic and only when the player collides with shapes like the icosahedron or dodecahedron. - All of the objects that are created using the standard cannon shapes, like cubes, spheres, cylinders, and even planes seem to be handling the collisions fine for me. (It may be worth mentioning that I have a sphere around the player element).

I tried two different scripts to generate the shapes (like the icosahedrons) including cannonUtils by Sean Bradley and three-to-cannon by Don McCurdy and the same problem happened with each of them. (In the end I settled on three-to-cannon). I have also tried messing with a lot of the different physics properties such as mass and friction etc.

My apologies if I have the terminology wrong here but I believe these shapes are referred to convex polyhedrons, and I figure the issue is something to do with how cannon handles the collisions with these types of shapes. I appreciate that it also may have something to do with the velocity of the player as it seems to only happen when the player is doing a fairly fast forward jump towards the object, yet the collisions are still working fine with the other objects.

I guess I’m just wondering if anyone has ever experienced a similar issue and if anyone out there has any potential ideas or solutions.

Much appreciation in advance. Henry.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions