Module KX_MouseFocusSensor :: Class KX_MouseFocusSensor

Class KX_MouseFocusSensor

source code

SCA_ILogicBrick.SCA_ILogicBrick --+        
                                  |        
            SCA_ISensor.SCA_ISensor --+    
                                      |    
        SCA_MouseSensor.SCA_MouseSensor --+
                                          |
                                         KX_MouseFocusSensor

The mouse focus sensor detects when the mouse is over the current game object.

The mouse focus sensor works by transforming the mouse coordinates from 2d device space to 3d space then raycasting away from the camera.

Instance Methods
list [x, y, z]
GetRayTarget()
Returns the end point of the sensor ray.
source code
list [x, y, z]
GetRaySource()
Returns the start point of the sensor ray.
source code

Inherited from SCA_MouseSensor.SCA_MouseSensor: getXPosition, getYPosition

Inherited from SCA_ISensor.SCA_ISensor: getFrequency, getInvert, getUseNegPulseMode, getUsePosPulseMode, isPositive, setFrequency, setInvert, setUseNegPulseMode, setUsePosPulseMode

Inherited from SCA_ILogicBrick.SCA_ILogicBrick: getExecutePriority, getOwner, setExecutePriority

Method Details

GetRayTarget()

source code 
Returns the end point of the sensor ray.
Returns: list [x, y, z]
the end point of the sensor ray, in world coordinates.

GetRaySource()

source code 
Returns the start point of the sensor ray.
Returns: list [x, y, z]
the start point of the sensor ray, in world coordinates.