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

Remove Navigation2D/3D nodes #46786

Merged
merged 2 commits into from
Mar 10, 2021
Merged

Remove Navigation2D/3D nodes #46786

merged 2 commits into from
Mar 10, 2021

Conversation

groud
Copy link
Member

@groud groud commented Mar 8, 2021

Implements this : godotengine/godot-proposals#691 (comment)

Finally we can get rid of those nodes. This avoid the need for NavigationRegion to have them as a direct parent, or, for any NavigationAgent or NavigationObstacle, to have them in their ancestors.

To replace them, the navigation map RID they used to hold has been moved to the world2D/3D resource.

This PR is a draft, as for now there is no way to have multiple maps per world, as we used to. I'll add a similar feature in a second commit by adding a system of layers/masks to the different regions/agents. It will work as it does for physics layers.

Edit: It seems that things works correctly in the 2D demo with little changes to the project. The 3D demo does not work in 4.0 (no meshes appears), so I cannot test.

@groud groud added this to the 4.0 milestone Mar 8, 2021
@groud groud requested a review from AndreaCatania March 8, 2021 09:59
@groud groud force-pushed the navigation branch 2 times, most recently from 79c9ac0 to 249f680 Compare March 9, 2021 10:13
@groud groud marked this pull request as ready for review March 9, 2021 10:14
@groud groud requested review from a team as code owners March 9, 2021 10:14
@groud groud removed request for a team March 9, 2021 14:29
Copy link
Contributor

@AndreaCatania AndreaCatania left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! Just a rename, but it's non blocking up to you.

scene/2d/navigation_obstacle_2d.h Outdated Show resolved Hide resolved
scene/3d/navigation_obstacle_3d.h Outdated Show resolved Hide resolved
scene/resources/world_2d.cpp Show resolved Hide resolved
@groud
Copy link
Member Author

groud commented Mar 10, 2021

Done!

@akien-mga akien-mga merged commit bc229cd into godotengine:master Mar 10, 2021
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

4 participants