Module KX_TrackToActuator :: Class KX_TrackToActuator
[hide private]
[frames] | no frames]

Class KX_TrackToActuator

source code

SCA_ILogicBrick.SCA_ILogicBrick --+    
                                  |    
        SCA_IActuator.SCA_IActuator --+
                                      |
                                     KX_TrackToActuator

Edit Object actuator in Track To mode.


Warning: Track To Actuators will be ignored if at game start, the object to track to is invalid.

This will generate a warning in the console:

ERROR: GameObject OBName no object in EditObjectActuator ActuatorName

Instance Methods [hide private]
 
setObject(object)
Sets the object to track.
source code
string, KX_GameObject or None if no object is set
getObject(name_only)
Returns the name of the object to track.
source code
 
setTime(time)
Sets the time in frames with which to delay the tracking motion.
source code
integer
getTime()
Returns the time in frames with which the tracking motion is delayed.
source code
 
setUse3D(use3d)
Sets the tracking motion to use 3D.
source code
boolean
getUse3D()
Returns True if the tracking motion will track in the z direction.
source code

Inherited from SCA_ILogicBrick.SCA_ILogicBrick: getExecutePriority, getOwner, setExecutePriority

Method Details [hide private]

setObject(object)

source code 

Sets the object to track.

Parameters:
  • object (KX_GameObject, string or None) - Either a reference to a game object or the name of the object to track.

getObject(name_only)

source code 

Returns the name of the object to track.

Parameters:
  • name_only (bool) - optional argument, when 0 return a KX_GameObject
Returns: string, KX_GameObject or None if no object is set

setTime(time)

source code 

Sets the time in frames with which to delay the tracking motion.

Parameters:
  • time (integer)

setUse3D(use3d)

source code 

Sets the tracking motion to use 3D.

Parameters:
  • use3d (boolean) - - True: allow the tracking motion to extend in the z-direction.
    • False: lock the tracking motion to the x-y plane.