jitspoe / godot_bsp_importer

An importer addon to import Quake BSP files.
MIT License
98 stars 9 forks source link

More accurate collision or use brushes info embedded in BSP to create collisions #16

Closed victorbstan closed 7 months ago

victorbstan commented 7 months ago

I'm noticing that on narrow angle blushes there can be large spaces in between the generated collision surfaces. I wonder if an alternative is to use the qbsp -wrbrushes flag to embed brushes and use the brush information for collision generation? Or use mesh collisions instead of convex collision generation?

Screenshot 2023-11-30 at 12 41 46 PM
jitspoe commented 7 months ago

I think this is the issue where the BSP file stores the collision bounds 1 unit smaller than they should be, which I happened to have just fixed: https://github.com/jitspoe/godot_bsp_importer/issues/15

You'll have to update directly from this github repo to get the fix until the asset library is updated.

There are also occasionally issues with collision from the gdscript implementation of making a convex hull from planes. If you're using 4.2 or later, you can edit the very end of the bsp_reader.gd file to uncomment this line: return Geometry3D.compute_convex_mesh_points(convex_planes)

victorbstan commented 7 months ago

[EDIT] implementing BOTH suggestions fixes the issue the collision seems precise and none missing, implementing just the new code without special line un-commenting rendered some of the wedges without collision completely.