Sign in to follow this  

help for pathfinding

This topic is 1960 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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:
[CODE]
float slope = 1.0f - normal.y;
[/CODE]
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

Share this post


Link to post
Share on other sites

This topic is 1960 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this