About Store Forum Documentation Contact



Post Reply 
A.I. must not fall of box actor.
Author Message
koekwaus Offline
Member

Post: #1
A.I. must not fall of box actor.
Hey,

I'm currently working on my A.I. of the game, now I have A.I. on platforms and they need to move freely on the platform but they need to know when to stop moving when they approach an edge so they don't fall off.

I've been trying to do this with rays but it hasn't been very successful. My question is: Are there better solutions?

Thanks!
05-31-2012 07:48 PM
Find all posts by this user Quote this message in a reply
Rubeus Offline
Member

Post: #2
RE: A.I. must not fall of box actor.
Have you tried casting the ray down and to the front of the AI so you get a prediction of an edge?
What about getting the position and size of the platform and making sure the AI does not exceed those bounds?
05-31-2012 08:12 PM
Find all posts by this user Quote this message in a reply
Mardok Offline
Member

Post: #3
RE: A.I. must not fall of box actor.
NavMesh ?

...or check distance from the edge? ...but when platform have irregular shape then it may be problematic, so NavMesh imo is best choice.
(This post was last modified: 05-31-2012 08:30 PM by Mardok.)
05-31-2012 08:27 PM
Find all posts by this user Quote this message in a reply
koekwaus Offline
Member

Post: #4
RE: A.I. must not fall of box actor.
Ah, i solved it. Turns out that the ray was hitting the AI. All i need to do was setting: actor.ray(false); -raycast- actor.ray(true);

Thanks for the replies and help!
06-01-2012 02:53 PM
Find all posts by this user Quote this message in a reply
Post Reply