|
objectobjectgets/sets the name of the object this actuator is tracking.Type: string or KX_GameObject Note:In the camera actuator, an object name must be entered. It can not be left blank. Once an object name has been entered, it can be changed to any object you want.Sample Code################## Get object# get the controllercontroller = GameLogic.getCurrentController()# get the actuator attached to the controller named actactCam = controller.actuators["act"]# get the KX_GameObjectobj = actCam.object# get the namename = obj.name################## Set object# get the controllercontroller = GameLogic.getCurrentController()# get the actuator attached to the controller named actactCam = controller.actuators["act"]# set name of the objectactCam.object = "Cube" |