Module GameTypes :: Class KX_TrackToActuator
[frames] | no frames]

Class KX_TrackToActuator

PyObjectPlus --+            
               |            
          CValue --+        
                   |        
     SCA_ILogicBrick --+    
                       |    
           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
bool
isA(game_type)
Check if this is a type or a subtype game_type. (Inherited from GameTypes.PyObjectPlus)
    Deprecated
 
setObject(object)
Sets the object to track.
string, KX_GameObject or None if no object is set
getObject(name_only)
Returns the name of the object to track.
 
setTime(time)
Sets the time in frames with which to delay the tracking motion.
integer
getTime()
Returns the time in frames with which the tracking motion is delayed.
 
setUse3D(use3d)
DEPRECATED: Use the property.
boolean
getUse3D()
Returns True if the tracking motion will track in the z direction.
integer
getExecutePriority()
Gets the execution priority of this logic brick. (Inherited from GameTypes.SCA_ILogicBrick)
string
getName()
Returns the name of the CValue. (Inherited from GameTypes.CValue)
KX_GameObject
getOwner()
Gets the game object associated with this logic brick. (Inherited from GameTypes.SCA_ILogicBrick)
 
setExecutePriority(priority)
Sets the priority of this logic brick. (Inherited from GameTypes.SCA_ILogicBrick)
Instance Variables
int executePriority
This determines the order controllers are evaluated, and actuators are activated (lower priority is executed first). (Inherited from GameTypes.SCA_ILogicBrick)
bool invalid
Test if the object has been freed by the game engine and is no longer valid. (Inherited from GameTypes.PyObjectPlus)
string name
The name of this CValue derived object (read-only). (Inherited from GameTypes.SCA_ILogicBrick)
KX_GameObject or None object
the object this actuator tracks.
KX_GameObject or None in exceptional cases. owner
The game object this logic brick is attached to (read-only). (Inherited from GameTypes.SCA_ILogicBrick)
integer time
the time in frames with which to delay the tracking motion
boolean use3D
the tracking motion to use 3D
Method Details

setObject(object)

 

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.

Deprecated: Use the object attribute instead.

getObject(name_only)

 

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

Deprecated: Use the object attribute instead.

setTime(time)

 

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

Parameters:
  • time (integer)

Deprecated: Use the time attribute instead.

getTime()

 

Returns the time in frames with which the tracking motion is delayed.

Returns: integer

Deprecated: Use the time attribute instead.

setUse3D(use3d)

 

DEPRECATED: Use the property. 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.

Deprecated: Use the use3D attribute instead.

getUse3D()

 

Returns True if the tracking motion will track in the z direction.

Returns: boolean

Deprecated: Use the use3D attribute instead.