I’m currently building a first person game but I cant seem to prevent my radar from ‘seeing’ through walls in my arena, ive read that this can be stopped by combining my radar with a ray sensor but im really struggling. Does anyone know how to do this??
import bge
cont = bge.logic.getCurrentController()
own=cont.owner
Radar=cont.sensors['Radar']
if sens.positive:
Ray=own.rayCastTo(Radar.hitObject,0,'property')
if Ray!=None:
Ray can see enemy
I tried both Ray and Radar for one object but nothing happens with an Always and steering bricks, on the other AI object it began spinning once I used a Radar even though it wasn’t connected to the motion brick.
Or it doesn’t work as they are? I’m sure those bricks work as they do, I must of used in my LIS files once. I mainly used collision or Always, Always was the standard for a steering brick.