| Class KX_RadarSensor (2.48) |
|
|
| getConeHeight |
getConeTarget |
| getConeOrigin |
----------
|
|
|
|
| getHitObject |
getProperty |
| getHitObjectList |
setProperty |
|
|
|
| getFrequency |
reset |
| getInvert |
setFrequency |
| getLevel |
setInvert |
| getUseNegPulseMode |
setLevel |
| getUsePosPulseMode |
setUseNegPulseMode |
| isPositive |
setUsePosPulseMode |
| isTriggered |
---------- |
|
|
|
| getExecutePriority |
setExecutePriority |
| getOwner |
---------- |
|
|
getConeHeight
getConeHeight()
Returns the distance the radar is checking.
Return type: float
Note:
This is the distance from the object's
center. Not the object's sides.
Sample
Code
# get the controller.
controller = GameLogic.getCurrentController()
# get the Radar sensor attached to the controller named
GuardDuty
radar = controller.getSensor("GuardDuty")
# get distance guard is checking
dist = radar.getConeHeight()
getConeOrigin
getConeOrigin()
Returns the origin of radar with which to test.
Return type: list [ x, y, z]
Sample
Code
# get the controller.
controller = GameLogic.getCurrentController()
# get the Radar sensor attached to the controller named
GuardDuty
radar = controller.getSensor("GuardDuty")
# get radar cone origin
coneOrigin = radar.getConeOrigin()
getConeTarget
getConeTarget()
Returns the center of the bottom face of the radar cone.
Return type: list[ x, y, z]
Sample
Code
# get the controller.
controller = GameLogic.getCurrentController()
# get the Radar sensor attached to the controller named
GuardDuty
radar = controller.getSensor("GuardDuty")
# get cone target
coneTarget = radar.getConeTarget()
|