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

CSG with collision is not baked in NavigationRegion3D with "Static Colliders" as geometry type #81027

Closed
Wiggan opened this issue Aug 26, 2023 · 2 comments

Comments

@Wiggan
Copy link

Wiggan commented Aug 26, 2023

Godot version

4.1.stable

System information

Windows10, AMD Ryzen 9 5900X, NVIDIA GeForce RTX 3060 Ti, driver version 30.0.15.1179, compatibility.

Issue description

When having a CSG based environment, navigation region 3d cannot use static colliders as geometry type. This limits the use of CSG I think.
I would love to be able to have CSGs with different collision layers and some to be baked into the nav region and others not.

Steps to reproduce

  1. Add a NavigationRegion3D to a scene
  2. Add a CSG box of 5, 1, 5m, enable collision
  3. Bake the nav region with geometry type set to static colliders
  4. See that nothing was baked.

Minimal reproduction project

Trivial to reproduce

@Calinou
Copy link
Member

Calinou commented Aug 26, 2023

StaticBodies and their collision shapes for CSG nodes are created using low-level PhysicsServer functions as opposed to StaticBody/CollisionShape nodes: https://github.com/DarioSamo/godot/blob/e3c4fa2455dc8c42da4c7485d48d5af50a76cdfe/modules/csg/csg_shape.cpp#L35-L64

This likely impacts the navigation bake step if it doesn't look for those PhysicsServer-created bodies/shapes.

@smix8
Copy link
Contributor

smix8 commented Aug 27, 2023

Duplicate of #79843 already fixed in master with #79643.

When parsing static colliders it now checks both the csg use_collision property and if there is a match with the csg collision_layers.

@smix8 smix8 closed this as completed Aug 27, 2023
@smix8 smix8 added the archived label Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants