arl/go-detour

Almost there!

Opened this issue · 4 comments

Heyy me again! I think I'm almost there but still struggling with some thingies!

I'm using an Unreal Engine 4 plugin to extract the navmesh from my game.
The output navmesh file is this one: Mundo.zip.

I used this other command line application that verifies the recast navigation data exported from UE: https://github.com/hxhb/ue4-recast-detour and everything with the navmesh is fine.
This app tries to project the points you give it into the navmesh with an extent of (10,10,10) and gives you the result (valid or invalid).

You can verify yourself using this commands
ue4-detour.exe Mundo.bin -113.72 -167.78 170.00
ue4-detour.exe Mundo.bin 27.69 -26.35 170

The path I'm trying to find is between this points:
Origin = (-113.72, -167.78, 170)
Destination = (27.69, -26.35, 170)

The projected points are the same to the ones I get when projecting them directly inside the game client, so I was thinking maybe I'm doing something wrong on the server side, because when I try to do the same in the server, It fails when executing the function FindNearestPoly in the Origin point. The status code is success but the point isn't valid (it didn't find any). I tried using an extent of like (10000,10000,10000) and it never finds any polygon.

The only new thing I just found out is that the verification app does convert the points from unreal 2 recast system and viceversa so I did the same on my server:
Sin título

And this is the code i'm using to find the straight path (the same as you used in the tests, but in spanish lol):
Sin título2
(it never goes past that if statement, because NavMesh.IsValidPolyRef returns false)

I'll keep investigating about this but I wanted to show you because maybe there's something I'm missing out and you could point me in the right direction.

Thanksss again!

arl commented

Ohhhhh man that was it!!!!
I can't express how happy I am now!!!

Now I can have the navigation system IN the server!! I can't believe it!!!

If you didn't tell me to try and generate the mesh with go-detour from the OBJ file... It would've taken me a really long time to figure it out!!

Now it seems it's working!! I've tried some paths and the results are quite possible! I'm gonna organize everything and establish a better communication with the client so I can start making real gameplay tests!!

Thank you so much!!!!!!!!! This project is what makes me feel alive.
Now with your help I can further advance with the whole player, npcs and monsters movement system!!

Maybe my last question? Is there any way to avoid the fmt.Print() that the library sends?

THANKSSSSSSSSSSSSSSSSSSSSSSSS!!!!

arl commented

Glad to see as enthusiasm as I had myself when I printed the first path out of my navmesh.
😆
About the print, I'm not sure which one you're talking about,tell me what it prints and I'll fix it
Cheers

There's nothing to fix!! Don't worry!!

Is there a way to set the nav agent height and radius?