Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Performance issue with a custom collider #697

Open
myznikovgleb opened this issue Sep 8, 2024 · 0 comments
Open

Performance issue with a custom collider #697

myznikovgleb opened this issue Sep 8, 2024 · 0 comments

Comments

@myznikovgleb
Copy link

myznikovgleb commented Sep 8, 2024

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!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant