How to prevent a character falling from a cliif

jomunoz

10-09-2007 01:22:17

Hi everyone,

Im looking for a way to prevent a character or NPC to fall down a cliff. Rigth now im thinking about puting invisible walls on the edge of the cliff or raycasting in the front, back, left and right of the character to look for cliff.

I'm thinking the raycasting method will be the best of the two, if someone knows of another method please share it with us.

betajaen

10-09-2007 09:10:08

An invisible wall, or even a trigger (to detect if the character has fallen off the cliff) would be fair better, and quicker too, else you'd be ray casting all the time even if the character is no where near the cliff.