Module KX_RaySensor

Source Code for Module KX_RaySensor

 1  # $Id: KX_RaySensor.py 2607 2004-05-30 11:09:46Z kester $ 
 2  # Documentation for KX_RaySensor 
 3  from SCA_ISensor import * 
 4   
5 -class KX_RaySensor(SCA_ISensor):
6 """ 7 A ray sensor detects the first object in a given direction. 8 """ 9
10 - def getHitObject():
11 """ 12 Returns the game object that was hit by this ray. 13 14 @rtype: KX_GameObject 15 """
16 - def getHitPosition():
17 """ 18 Returns the position (in worldcoordinates) where the object was hit by this ray. 19 20 @rtype: list [x, y, z] 21 """
22 - def getHitNormal():
23 """ 24 Returns the normal (in worldcoordinates) of the object at the location where the object was hit by this ray. 25 26 @rtype: list [nx, ny, nz] 27 """
28 - def getRayDirection():
29 """ 30 Returns the direction from the ray (in worldcoordinates) 31 32 @rtype: list [dx, dy, dz] 33 """
34