Handling collisions for large terrain with LOD

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Macryc

Hi. Using Godot 4’s built-in LOD system to optimize chunked terrain. The chunks are imported meshes (ArrayMesh).
When I generate collisions for these chunks via create_trimesh_shape()those collisions are unaffected by LOD - they’re full resolution at all times which is impacting performance.
Loading and discarding chunk collisions based in player proximity is not really an option as I need the entire terrain to have collisions at all times for other reasons. Also, collision shapes should be accurate (ie, same LOD as the terrain, otherwise I’d be walking through terrain etc…)

Question: Is there a way to optimize collision shapes? Maybe if I generate them with code I can enable some sort of LOD for the collision shapes?