TheSHEEEP / godotdetour

A GDNative implementation of the detour/detourcrowd library for Godot.
MIT License
120 stars 19 forks source link

Conversion to Godot 4 #17

Closed SlateyDev closed 1 year ago

SlateyDev commented 1 year ago

I have started undertaking the task of converting this project over to Godot 4 as there has been no activity for a while now.

You had mentioned possibly doing this yourself, are you interested in collaborating at all to get this working or have you cancelled the project you were doing this for?

Regardless I need a navmesh system for Godot 4 that actually works and is more robust as the one built-in to Godot is not working for us. I have done most of the conversion already with a few things not fully working (especially Debug Drawing as the surface tool has been changed enough that it now breaks when you try to pass through it more than 256 surfaces)

TheSHEEEP commented 1 year ago

Honestly, my suggestion for this would be to make your own repo, or fork this one. Maybe name it godotdetour4 or so. I don't think it makes sense to support both Godot 3 and Godot 4 on the same repository. Unless you have found a way to make the same plugin code work for both versions.

Out of interest, what is missing for you from the built-in Godot one? One of the reasons I am not actively working on this anymore is that my project is on halt and whenever it resumes I will most likely use Godot 4.X. And the built-in Godot 4 navigation looks like some of the restrictions mentioned in this repo don't even exist anymore or are actively being worked on (likely done before I'll have time again for my own project).

SlateyDev commented 1 year ago

Most other repos just have a branch separation for the godot versions.

Why we are looking at using a different navmesh solution is:

TheSHEEEP commented 1 year ago

Yes, I saw that very large/detailed meshes can be a problem. I think that is often worked around by having a much lower resolution mesh representing long distance travel with "rough" directions and higher resolution meshes for short distances.

Same with agent navigation - detour has issues with that as well. For example, it isn't really possible to have more realistic agent movement - all agents move in a straight line, using the shortest path available, but that's not what you always want like with vehicles that need turn speed restraints, etc.

I hope you did raise those issues on Godot, though, slow as they might be in resolving them :laughing:

I have unfortunately come to the conclusion that all "readymade" solutions (not sure about the paid ones) are heavily flawed and something like this repo can always only function as a basis for a real implementation in a given project.

Since I simply don't have the time (or personal motivation) right now to maintain another branch with a quite different version, I just can't support that for this repo. Unless you'd like to take over the repo as a whole, including the version for 3.2+, in which case I'm more than open to that.

SlateyDev commented 1 year ago

I have completed my consideration of this method of navigation and found that it is not suitable for what we need anyway. I will leave my fork there and maybe come back again another time to work on it further but for now we are considering a much simpler A* for our needs.

Thanks for your feedback.