object
object
gets/sets the name of the object to be tracked.
Set Type: string (object name without OB in
front of it.)
or
KX_GameObject
Return Type: KX_GameObject
or
None
Sample
Code
################### Get object
# get controller
controller = GameLogic.getCurrentController()
# get actuator attached to the controller named RaceCam
act = controller.actuators["RaceCam"]
# get object being tracked
obj = act.object
################### Set object
# get controller
controller = GameLogic.getCurrentController()
# get actuator attached to the controller named RaceCam
act = controller.actuators["RaceCam"]
# set object being tracked
act.object = "Cube"
|