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

Baking a NavigationMesh for HeightMapShape creates incorrect NavMesh #76195

Closed
rustwork opened this issue Apr 18, 2023 · 0 comments · Fixed by #76212 or #83783
Closed

Baking a NavigationMesh for HeightMapShape creates incorrect NavMesh #76195

rustwork opened this issue Apr 18, 2023 · 0 comments · Fixed by #76212 or #83783

Comments

@rustwork
Copy link

Godot version

4.0.2.stable

System information

Windows 10, Vulkan, Nvidia RTX 3060 Ti

Issue description

When baking a NavMesh from code for a StaticBody3D that has a HeightMapShape as its Shape, the resulting navmesh is offset and skewed strangely.

Here's a simple example where a radial gradient image is used to generate cone shaped collision for a HeightMapShape. As you can see the navmesh is offset and distorted compared to the collision.

radial

navmesh

Steps to reproduce

Please see the Minimal Repro project attached below.
When you run it, you can move the debug camera with WASD and rotate it by holding down the right mouse button.

The project is structured like this:

navmesh_proj

Note: The Parsed Geometry Type of the NavigationMesh is set to Static Colliders

The script on the root node generates collision from an image and then bakes the navmesh.

Minimal reproduction project

NavmeshBug.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants