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

Add NavigationPolygon cell_size property #78172

Merged
merged 1 commit into from
Jun 13, 2023

Conversation

smix8
Copy link
Contributor

@smix8 smix8 commented Jun 13, 2023

Adds NavigationPolygon cell_size property, same as NavigationMesh already has.

Theoretically this was always needed but 2D navigation did just assume a default 1.0 cell_size behind the scene. It never updated the cell_size correctly on the internal NavigationMesh from the default 0.25. There was no way for 2D users to change it other can getting the NavigationMesh manually and changing the cell_size.

Needed now because 2D runs into the cell_size validation for the navigation map on the NavigationServer added with #77714.

In case someone wonders why not just remove the check when it requires so much extra ... all the other prs that also require a cell_size property on the NavigationPolygon are not in yet and strictly speaking not able to change the cell_size was always a bug.

Adds NavigationPolygon cell_size property.
@smix8 smix8 force-pushed the navpoly_cell_size_4.x branch from 9a5e778 to 9c8626b Compare June 13, 2023 08:53
@smix8 smix8 requested a review from a team as a code owner June 13, 2023 08:53
@smix8 smix8 added this to the 4.1 milestone Jun 13, 2023
@akien-mga akien-mga changed the title Add NavigationPolygon cell_size property Add NavigationPolygon cell_size property Jun 13, 2023
@akien-mga akien-mga merged commit ad935c4 into godotengine:master Jun 13, 2023
@akien-mga
Copy link
Member

Thanks!

@smix8 smix8 deleted the navpoly_cell_size_4.x branch June 13, 2023 12:05
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.

2 participants