Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / 3D waypoints pathfinding

Author
Message
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 10th Apr 2023 11:00
Hi

I try to use the code found here by JohnStabler : https://forum.thegamecreators.com/thread/217692 (the same id here : https://www.thegamecreators.com/codebase/view/cc4c3f0f23bcf1a5eafe68c00930fa18)

But, It seems it doesn't work, and I don't know why.

Here is my example code :



If you have an idea how to fixe that, It would be great
AGK2 tier1 - http://www.dracaena-studio.com
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 6th May 2023 09:46
Works for me, perfectly.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 7th May 2023 01:56 Edited at: 7th May 2023 02:11
GCH wrote: "Works for me, perfectly."
so, the player doesn't pass through the yellow box for you?

@Blendman, i see what you mean and the raycasts are working. i've never used a system like this so still studying it...
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 9th May 2023 21:48
hey blendman dont know if you solved your issues with it passing through the box
but clonkex's bezier curve library may help as you really only need x and z so the fact its
2d it shouldnt be hard to make work in 3d https://forum.thegamecreators.com/thread/221096

anyway let us know how you get on with getting your paths to work
fubarpk
https://fubarpk.itch.io/
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 11th May 2023 16:30
Hi

unfortunately, I don't know how to fixe the issue ^^
So if someone knows how to resolve this , I'm very interested
AGK2 tier1 - http://www.dracaena-studio.com
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 11th May 2023 22:10 Edited at: 11th May 2023 22:10
It looks like your "GetShortest" function is a brute force test for the shortest distance between the current waypoint and any other waypoint. Shouldn't it take into account the Neighbours data?
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 16th May 2023 09:25
HI

I have tried to change the function GetShortest(), but it doesn't work :



In fact, I don't what I should do to fixe the "bug" of the code from john stabler ^^
AGK2 tier1 - http://www.dracaena-studio.com
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz

Login to post a reply

Server time is: 2024-04-23 19:57:41
Your offset time is: 2024-04-23 19:57:41