-
Notifications
You must be signed in to change notification settings - Fork 144
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
Update debug collision on operations #106
Comments
Maybe, instead of using collision shapes, we could make a plane mesh with same structure as the collider would be and make a wireframe shader for it? |
That's an interesting idea. And that could work in game as well. |
Just some notes from my experimentation adding this (in my game the collision updates after edits in game, but it would be the same for updating in the editor) Switched to generate 1 heightmap shape per region (instead of 1 big one covering every region). Then when edits happen, they only update the single region. (Code is here but its very very rough main...matthewhilton:Terrain3D:collision-update-improvements-090) My game only has max 8 regions so this is OK. Might not be suitable for larger terrains. Performance optimisation:
|
#278 will address this. |
#278 Dynamic collision has been implemented and we need testers. Currently dynamic collision is updated on the fly and is fast in the editor. Realtime changes are feasible. Full mode (old static debug collision) is still slow because there's a lot of data. It does rebuild on region add/remove and some settings changes like mode. It won't update during sculpting. However the user can update it by calling update(). See #278 (comment) |
When adding/removing regions, sculpting, undo/redo the debug collision shapes are not updated automatically.
Currently the user must turn _show_debug_collision off and on.
Currently updating destroys and rebuilds and takes .5-1s to update, so it's not good to update on every painting. It could update during the undo/redo setup, but that's still a bit slow.
What would be faster to mark dirty regions and only update those. It also needs to add and remove CollisionShapes as regions are added or removed.
The text was updated successfully, but these errors were encountered: