-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terrain collider using Rapier's heightfield #5
Comments
Hi Zeerooth, The overlapping data tiles are the problem with extracting the collision mesh from the preprocessed terrain data. Ideally, we could just sample the height value at any XZ coordinate on the CPU just like we do it in the shaders. Alternatively, we could create mesh segments from the source height data, that we manage separately. |
Thanks for the reply, I managed to conjure a rough prototype of the heightfield collider inside bevy_terrain, without offloading the collider for now (see the PR), but the issue is with scaling and the gaps between colliders. Overlapping data tiles that you mentioned wouldn't be much of a problem, but after debugging the code for a bit I'm pretty certain that the tile that we get from NodeAtlas's height attachments don't contain the border data between the individual lod 0 nodes and I don't know if that's by design or maybe a bug. The documentation states that it should be included so I'm confused why they don't seem to match at all. Could you share some of your insight into this please? |
Would love to see this too! 👍 |
Hello,
I really like this project, but one of the important things that appear to be missing for potential games and simulations is colliders on the terrain. Rapier contains a collider type that seems to be ideal for this purpose, I'm talking about heightfield colliders. Are there possibly any plans to include this? I tried to make a prototype with these myself, but this project is pretty big and honestly I have no idea where to even begin. Can you provide me with some guidance? Most importantly I need to find a step in the whole preprocessing/rendering pipeline where the images are processed and already available in the form of 2d height matrix, spawning a collider at this point should be trivial.
The text was updated successfully, but these errors were encountered: