Skip to content

Performance issue with a custom collider #697

Open
@myznikovgleb

Description

@myznikovgleb

Description

I ran into a issue where a dynamic rigid body with a custom collider falls through another fixed rigid body containing a lot of meshes. The first rigid body can represent a character, the latter one can represent a map with obstacles. It is regularly reproduced only if the map contains a significant (about 1000) amount of meshes

There is one peculiarity, a dynamic rigid body with an automatic collider behaves correct and does not fall through the map

Example

I've made a sandbox to reproduce the issue. Link below
https://codesandbox.io/p/sandbox/mc6qdr

Solution

Initially, I thought that that issue was caused by improper assets loading. Because I faced something similar to #522. But it seems to be a wrong direction. The issue is reproduced even without external assets. And the example above also does not contain any assets

For now, I have only one solution. I use a dynamic rigid body with an automatic collider instead of a custom one. Check the sandbox or docs https://github.com/pmndrs/react-three-rapier?tab=readme-ov-file#automatic-colliders

It would be great to investigate reasons of the issue and fix it. Or at least find a more subtle solution. Any help appreciated!

Metadata

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