axis
axis
gets/sets the axis the ray points
Type: integer
0 = KX_RADAR_AXIS_POS_Y
1 = KX_RADAR_AXIS_POS_X
2 = KX_RADAR_AXIS_POS_Z
3 = KX_RADAR_AXIS_NEG_X
4 = KX_RADAR_AXIS_NEG_Y
5 = KX_RADAR_AXIS_NEG_Z
Sample
Code
############## Get axis
# get the controller.
controller = GameLogic.getCurrentController()
# get the Ray sensor attached to the controller named
GuardDuty
ray = controller.sensors["GuardDuty"]
# get ray axis
axis = ray.axis
############## Set axis
# get the controller.
controller = GameLogic.getCurrentController()
# get the Ray sensor attached to the controller named
GuardDuty
ray = controller.sensors["GuardDuty"]
# set ray axis
ray.axis = 0
|