Class KX_RadarSensor (2.48)


Methods
getConeHeight getConeTarget
getConeOrigin ----------
 
Variables
---------- ----------
 
Constants
---------- ----------


Inherited Methods:  Class KX_NearSenor
getHitObject getProperty
getHitObjectList setProperty


Inherited Methods:  Class SCA_ISensor
getFrequency reset
getInvert setFrequency
getLevel setInvert
getUseNegPulseMode setLevel
getUsePosPulseMode setUseNegPulseMode
isPositive setUsePosPulseMode
isTriggered ----------

Inherited Methods:  Class SCA_ILogicBrick
getExecutePriority setExecutePriority
getOwner ----------

Inherited Methods:  Class PyObjectPlus
isA ----------

Inherited Methods:  Class Value
getName ----------



Methods



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()



Blender 3D
Game Engine