1
# $Id: KX_TouchSensor.py,v 1.3 2004/06/02 12:43:27 kester Exp $
2
# Documentation for KX_TouchSensor
3
from SCA_ISensor import *
5
class KX_TouchSensor(SCA_ISensor):
7
Touch sensor detects collisions between objects.
11
Set the property or material to collide with. Use
12
setTouchMaterial() to switch between properties and
18
Returns the property or material to collide with. Use
19
getTouchMaterial() to find out whether this sensor
20
looks for properties or materials.
27
Returns the last object hit by this touch sensor.
29
@rtype: L{KX_GameObject}
31
def getHitObjectList():
33
Returns a list of all objects hit in the last frame.
35
Only objects that have the requisite material/property are listed.
37
@rtype: list [L{KX_GameObject}]
39
def getTouchMaterial():
41
Returns KX_TRUE if this sensor looks for a specific material,
42
KX_FALSE if it looks for a specific property.
44
def setTouchMaterial(flag):
46
Set flag to KX_TRUE to switch on positive pulse mode,
47
KX_FALSE to switch off positive pulse mode.
49
@type flag: KX_TRUE or KX_FALSE.