Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

help for pathfinding

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 zar2012   Members   

137
Like
0Likes
Like

Posted 04 August 2012 - 04:37 AM

Hello all.
I'm about to create an AI system for a 3d game engine and facing some issues.
the problem is that I have a terrain and want to implement a pathfinding system on it but I don't know exactly what to do. could anyone please tell me what the best way to do that is? Is it to use waypoints, to use a navigation mesh or to use the terrain's own nodes and triangles? and what things should I consider before any decision-making?

#2 DgekGD   Members   

374
Like
0Likes
Like

Posted 05 August 2012 - 03:56 PM

Probably, for such algorithm as A*, you have to convert your terrain to pathfinding graph firstly. For example, in my game i check the slope of every triangle of the terrain:
float slope = 1.0f - normal.y;
and if the slope is close to 1.0f, then i mark this part of terrain as unwalkable, otherwise convert it to the node in pathfinding graph.
In resulting graph just use A*.

When a character moves, game automatically sets y position(height) of a character based on the position of a triangle below it.

Edited by DgekGD, 05 August 2012 - 03:57 PM.





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.