Skip to content
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

Showing terrain collision while in game for debugging #264

Open
Stark-coder opened this issue May 19, 2021 · 1 comment
Open

Showing terrain collision while in game for debugging #264

Stark-coder opened this issue May 19, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@Stark-coder
Copy link

Is it possible to show collision of the terrain while on game similar to editor option "Debug > visible collision shapes"?

@Zylann
Copy link
Owner

Zylann commented May 19, 2021

It is likely easy to implement naively, but it would completely destroy performance, because it basically means showing a wireframe version of the entire terrain without level of detail. So it might be ok for relatively small terrains from 512 to 1024, but starting from 2048 it might start to be really slow to load (there is a big wireframe mesh to make) and to render. Debug collision shapes is a global option, so if this was supported on terrains, it should at least be optional.

It is not available because so far I considered it kinda useless to display, considering that the shape basically matches the visuals at lod0 (it's not like having a capsule collider for a character where in this case it really helps), there is no particular difference apart from the Z-shape of triangles used by Bullet and the diamond shape used for rendering. It might get a bit more useful if we add the option to use half-resolution collision shape though.

Note, if you want this to troubleshoot collision issues by seeing how the collider looks like, a better way is not to rely on this, but instead use a more direct tool such as collision scanner. A wireframe mesh would not be able to detect known issues like this godotengine/godot#37337. There are also issues with Areas specifically which were not figured out yet (these are bugs of the engine, not the plugin).

@Zylann Zylann added the enhancement New feature or request label May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants