You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
I would like the player to be able to zoom in a set distance to a point outside of the navigation mesh. The problem is that even if the navmesh is generated in such a way that the distances from its edges to the tower are the same (literally, with an accuracy of 0.000001), when building the path, one point is still selected, to which the agent moves:
simplescreenrecorder-2022-01-17_04.24.45.mp4
The green dot is the target. Blue is the point chosen by the end agent. Green zone - desired radius (doesn't play a role)
Describe the feature / enhancement and how it helps to overcome the problem or limitation
See below.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Rename the target_desired_distance navigation field of NavigationAgent to waypoint_radius to avoid misconceptions like godotengine/godot#56813 in the future. Introduce the desired_target_distance field (by default equal to zero) as the distance to the target (which is set by the set_target_location), so that the agent aim for any nearest point in this radius. Or let the user pass an array of points to the agent so that he chooses the closest one of his own, for example, by introducing the set_target_locations function (which is likely to be the most generic solution). Or introduce an enum that will allow to choose what to do if the point is outside the navmesh: look for the nearest edge to it or go to the nearest edge that encircles this point.
If this enhancement will not be used often, can it be worked around with a few lines of script?
I tried - I didn't succeed. Probably a few lines are not enough.
Is there a reason why this should be core and not an add-on in the asset library?
While trying to solve a seemingly simple problem
(again)the character needs to approach the building no matter from which side, but at the same time everyone else should avoid it if they do not need itI felt like I was thinking about how I could write my own navigation, but I didn't want to spend time on it and didn't want anyone to have to.
The text was updated successfully, but these errors were encountered:
Describe the project you are working on
Simple League-of-Legends alike MOBA
Describe the problem or limitation you are having in your project
I would like the player to be able to zoom in a set distance to a point outside of the navigation mesh. The problem is that even if the navmesh is generated in such a way that the distances from its edges to the tower are the same (literally, with an accuracy of 0.000001), when building the path, one point is still selected, to which the agent moves:
simplescreenrecorder-2022-01-17_04.24.45.mp4
The green dot is the target. Blue is the point chosen by the end agent. Green zone - desired radius (doesn't play a role)
Describe the feature / enhancement and how it helps to overcome the problem or limitation
See below.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Rename the
target_desired_distance navigation
field of NavigationAgent towaypoint_radius
to avoid misconceptions like godotengine/godot#56813 in the future. Introduce thedesired_target_distance
field (by default equal to zero) as the distance to the target (which is set by theset_target_location
), so that the agent aim for any nearest point in this radius. Or let the user pass an array of points to the agent so that he chooses the closest one of his own, for example, by introducing theset_target_locations
function (which is likely to be the most generic solution). Or introduce an enum that will allow to choose what to do if the point is outside the navmesh: look for the nearest edge to it or go to the nearest edge that encircles this point.If this enhancement will not be used often, can it be worked around with a few lines of script?
I tried - I didn't succeed. Probably a few lines are not enough.
Is there a reason why this should be core and not an add-on in the asset library?
While trying to solve a seemingly simple problem
(again)
the character needs to approach the building no matter from which side, but at the same time everyone else should avoid it if they do not need itThe text was updated successfully, but these errors were encountered: