Game Development Community

aiPlayer afraid of the water??

by deepscratch · in Torque Game Engine Advanced · 03/18/2009 (7:28 am) · 2 replies

hi there,
so how can one get an aiPlayer to follow the player into water? they seem to get ankle deep then go out, also, they cant seem to see the player when he is in water.
any fixes for this?
ta

#1
03/18/2009 (8:29 am)
Not sure about following the player, but for line of sight, are you sure that it's disregarding the waterblock when it does a raycast? In the water, a player is inside the waterblock object, so unless you have that mask screened out, los functions may not see the player.
#2
03/19/2009 (11:10 am)
yeah, I added
$TypeMasks::WaterObjectType
to his scripted raycasting, now he follows me into the water, and even swims when he enters the water.
lovely, thanks Ted.