godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.16k stars 97 forks source link

Allow customizing the up axis when baking a NavigationMesh #9192

Open theromis opened 8 months ago

theromis commented 8 months ago

Describe the project you are working on

My project is vertical tunnel with obstacle avoidance, to make enemies chasing player finally I've rotated game 90 degrees.

Describe the problem or limitation you are having in your project

Right now NavMesh baking available only with Z axis up, if possible set Y or X it will simplify a lot of lives :)

Describe the feature / enhancement and how it helps to overcome the problem or limitation

NavMesh up direction will let bake mesh in any direction.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Just add extra option in NavigationMesh direction with default value Z up.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Workaround just generate NavMesh programmatically.

Is there a reason why this should be core and not an add-on in the asset library?

Baking is a core godot feature, so there is no other options.

smix8 commented 8 months ago

This would not only require major reworks but also be a huge technical liability going forward for something niche. Half the involved engine systems and third-party libraries assume or force Vector3.UP.

To be clear, this is not a "no", it is a "not with the current available resources".

theromis commented 8 months ago

Thank you for clarification, I thought it relatively easy

yosoyfreeman commented 8 months ago

This would not only require major reworks but also be a huge technical liability going forward for something niche. Half the involved engine systems and third-party libraries assume or force Vector3.UP.

To be clear, this is not a "no", it is a "not with the current available resources".

CharacterBody3D is designed to work with an arbitrary vector and is the node intended for characters. Is a big discrepancy between the characters and the tool provided to move them.