Robo Rampage: CSGpolygon3d not working

godot 4.3.stable

I have done a ton of searching and reading and can not find a solution for this. I get a weird orange bounding box around any CSGpolygon3d shape I make. It stops it from sitting on top of other objects. It happens only on poly shapes not the other CSG shapes (box, cylinder, etc.) I even started a new project to see if it happens and it does. Any and all help is apricated.

There does indeed seem to be a set of minimum dimensions for the bounding box on CSGPolygon3D. It’s relative to the shape’s origin, depending on the node’s mode (Depth, Spin or Path), and exceeding those dimensions with the shape itself will cause the bounding box to expand as expected. I didn’t find any way of altering these minimum dimensions, nor do I know why they’re there specifically for CSGPolygon3D in the first place, but I did find that you can fake a result by drawing a polygon of sufficient size to properly fill the bounding box, then scaling the node down to match what you need (I’d recommend maintaining uniform scale and keeping things as simple as possible, but that’s not strictly necessary). If you’re going to use this as a physics-interactive game asset, this will be fine as long as you double-check that the collision works as expected, which is another reason for keeping the scale uniform.

More generally, if you are able to use a MeshInstance3D instead, that will be more performant as an actual game asset according to the Godot Docs:

But of course, this isn’t always practical since CSGPolygon3D can generate things that MeshInstance3D can’t. You can model something in Blender and use it as the Mesh of a MeshInstance3D; it takes longer, but this has worked well for me. Qodot and TrenchBroom are also options; they seem to be Godot’s answer to Unity’s ProBuilder for in-engine prototyping, but I’ve never used these tools.

Hopefully something in here will help you proceed with what you’re planning to do =)

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms