Game Development Community

LOS target thru walls

by Howard Dortch · in Torque Game Engine · 08/06/2004 (8:47 am) · 2 replies

I have a LOS routine that cast a ray from the bot to my player. If it sees me it shoots me. Problem I have is the bot sees thru walls, I added the $TypeMasks::InteriorObjectType to the mask for the raycast but if I leave it in or take it out the bot still shoots at me when I am hidden in a building. Any hints?

#1
08/10/2004 (2:46 pm)
Mostlikely the ray cast is always returning 0, check your code to see if theres anything that might be causing a NULL return.
#2
08/10/2004 (4:06 pm)
The raycast returns my player as the target always
I thought it would fire a ray in 3space and return the first thing it intersects from the mask so if my player is in a building or behind a TSS object the ray would not see my player and hence return a different object.