|
Re: Tip of the Week #10: New Pathfinding Solution!
[Re: WretchedSid]
#435413
01/07/14 19:05
01/07/14 19:05
|
Joined: Aug 2002
Posts: 3,258 Mainz
oliver2s
Expert
|
Expert
Joined: Aug 2002
Posts: 3,258
Mainz
|
3) I am a Softwaredeveloper, and to avoid later complications, my boss likes to know before i publish something in my sparetime. Your boss has NO say whatsoever over your free time and what you do with it, unless it involves selling company secrets to the competition. That's not true. At least in Germany the boss can claim that, related to employee laws.
|
|
|
Re: Tip of the Week #10: New Pathfinding Solution!
[Re: oliver2s]
#435421
01/07/14 22:20
01/07/14 22:20
|
Joined: Oct 2007
Posts: 5,210 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
|
THEN MOVE TO ANOTHER COUNTRY, QUICK!
3333333333
|
|
|
Re: Tip of the Week #10: New Pathfinding Solution!
[Re: Superku]
#435580
01/09/14 10:47
01/09/14 10:47
|
Joined: Feb 2006
Posts: 1,011 Germany
pegamode
Serious User
|
Serious User
Joined: Feb 2006
Posts: 1,011
Germany
|
Yes, I just tried. The problem is that I want to tie the moving character onto the path. In your version the player first walks to the first node, then follows the calculated path and then walks to the clicked point by leaving the path. Take a look at this picture: The blue dot is the clicked point and the red dot is the target I want the player to move to as it's on the path between node 3 and 2.
|
|
|
Re: Tip of the Week #10: New Pathfinding Solution!
[Re: pegamode]
#435592
01/09/14 13:13
01/09/14 13:13
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
OP
Senior Expert
|
OP
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
@alibaba: It is the new code on the wiki, I've just replaced the old zip file on my webspace with the new one. I forgot to link it here, though: http://www.superku.de/HPF.zip@pegamode: Once you find the correct nodes the rest should not be difficult. I've posted such a vector projection some time ago on the forum or have a look at my one region function which calculates the projection onto the region bounding box. EDIT: Btw. you can use my/ your pathfinding code for this and simply ignore the last node. When the entity reaches the second last node, calculate said projection, "abort" the regular pathfinding and move the entity to the newly calculated target.
Last edited by Superku; 01/09/14 13:47.
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
|