useXRay
useXRay
gets/sets if sensor is using XRay to look through objects that doesn't
have the required property/material
Type: Bool
1 = True
0 = False
Sample
Code
################## Get useMaterial
# get the controller
controller = GameLogic.getCurrentController()
# get the ray sensor attached to the controller named
GuardDuty
ray = controller.sensors["GuardDuty"]
# Using XRay?
name = ray.useXRay
################## Set property
# get the controller
controller = GameLogic.getCurrentController()
# get the ray sensor attached to the controller named
GuardDuty
ray = controller.sensors["GuardDuty"]
# Don't use XRay
ray.useXRay = False
|