Problems with detecting a fallable edge and also multiple character sizes

Hi,

I’ve been going through the documentation but can’t seem to find an answer to some problems.

I’m using a Recast Graph for my project.

How can a character know that they can fall off a ledge safely to the ground below? Obviously this should only be one way but I can’t seem to find any way of doing this. Do I add to an existing navmesh (I’m unsure if you can) or is there a better way?

Also how do your account for different sized characters when creating paths/graphs. Do you make 1 graph per character/size (I think from what I found you can only use 3 graphs max?). How do you allow this?

Thanks.

Hi

There is no way currently for the scripts to automatically generate fall off ledges, however you can take a look at the recast example scenes where there is a character jumping and climbing and use the same kinds of links which you manually place.
Then you could have a special behaviour for those so that the character will play a jumping/falling animation when traversing them.
It might be a bit tricky to get it one-way though… but the component might have an option for it, I cannot remember.

For best results you have to create a graph per character radius, but you can also try the ‘Radius Modifier’ which tries to give an approximate result, even if it is not always perfect, it is better than nothing.
More than 3 graphs can be created in the latest beta.
You would have to use the graphMask feature when you start the path (small modifications to the movement scripts required).

See http://arongranberg.com/astar/docs_dev/class_seeker.php#ab50a876ab529ceb3eb9b97deb5a48d1e
and http://arongranberg.com/astar/docs_dev/class_pathfinding_1_1_n_n_constraint.php#a63a785ae519f012d295916dd9969170c