Module KX_ObjectActuator :: Class KX_ObjectActuator

Class KX_ObjectActuator

source code

SCA_ILogicBrick.SCA_ILogicBrick --+    
                                  |    
        SCA_IActuator.SCA_IActuator --+
                                      |
                                     KX_ObjectActuator

The object actuator ("Motion Actuator") applies force, torque, displacement, angular displacement, velocity, or angular velocity to an object.

Instance Methods
list [fx, fy, fz, local]
getForce()
Returns the force applied by the actuator.
source code
 
setForce(fx, fy, fz, local)
Sets the force applied by the actuator.
source code
list [Τx, Τy, Τz, local]
getTorque()
Returns the torque applied by the actuator.
source code
 
setTorque(tx, ty, tz, local)
Sets the torque applied by the actuator.
source code
list [dx, dy, dz, local]
getDLoc()
Returns the displacement vector applied by the actuator.
source code
 
setDLoc(dx, dy, dz, local)
Sets the displacement vector applied by the actuator.
source code
list [dx, dy, dz, local]
getDRot()
Returns the angular displacement vector applied by the actuator.
source code
 
setDRot(dx, dy, dz, local)
Sets the angular displacement vector applied by the actuator.
source code
list [vx, vy, vz, local]
getLinearVelocity()
Returns the linear velocity applied by the actuator.
source code
 
setLinearVelocity(vx, vy, vz, local)
Sets the linear velocity applied by the actuator.
source code
list [ωx, ωy, ωz, local]
getAngularVelocity()
Returns the angular velocity applied by the actuator.
source code
 
setAngularVelocity(wx, wy, wz, local)
Sets the angular velocity applied by the actuator.
source code

Inherited from SCA_ILogicBrick.SCA_ILogicBrick: getExecutePriority, getOwner, setExecutePriority

Method Details

getForce()

source code 
Returns the force applied by the actuator.
Returns: list [fx, fy, fz, local]
A four item list, containing the vector force, and a flag specifying whether the force is local.

setForce(fx, fy, fz, local)

source code 
Sets the force applied by the actuator.
Parameters:
  • fx (float) - the x component of the force.
  • fy (float) - the z component of the force.
  • fz (float) - the z component of the force.
  • local (boolean) - - False: the force is applied in world coordinates.
    • True: the force is applied in local coordinates.

getTorque()

source code 
Returns the torque applied by the actuator.
Returns: list [Τx, Τy, Τz, local]
A four item list, containing the vector torque, and a flag specifying whether the torque is applied in local coordinates (True) or world coordinates (False)

setTorque(tx, ty, tz, local)

source code 
Sets the torque applied by the actuator.
Parameters:
  • tx (float) - the x component of the torque.
  • ty (float) - the z component of the torque.
  • tz (float) - the z component of the torque.
  • local (boolean) - - False: the torque is applied in world coordinates.
    • True: the torque is applied in local coordinates.

getDLoc()

source code 
Returns the displacement vector applied by the actuator.
Returns: list [dx, dy, dz, local]
A four item list, containing the vector displacement, and whether the displacement is applied in local coordinates (True) or world coordinates (False)

setDLoc(dx, dy, dz, local)

source code 

Sets the displacement vector applied by the actuator.

Since the displacement is applied every frame, you must adjust the displacement based on the frame rate, or you game experience will depend on the player's computer speed.
Parameters:
  • dx (float) - the x component of the displacement vector.
  • dy (float) - the z component of the displacement vector.
  • dz (float) - the z component of the displacement vector.
  • local (boolean) - - False: the displacement vector is applied in world coordinates.
    • True: the displacement vector is applied in local coordinates.

getDRot()

source code 
Returns the angular displacement vector applied by the actuator.
Returns: list [dx, dy, dz, local]
A four item list, containing the angular displacement vector, and whether the displacement is applied in local coordinates (True) or world coordinates (False)

setDRot(dx, dy, dz, local)

source code 

Sets the angular displacement vector applied by the actuator.

Since the displacement is applied every frame, you must adjust the displacement based on the frame rate, or you game experience will depend on the player's computer speed.
Parameters:
  • dx (float) - the x component of the angular displacement vector.
  • dy (float) - the z component of the angular displacement vector.
  • dz (float) - the z component of the angular displacement vector.
  • local (boolean) - - False: the angular displacement vector is applied in world coordinates.
    • True: the angular displacement vector is applied in local coordinates.

getLinearVelocity()

source code 
Returns the linear velocity applied by the actuator.
Returns: list [vx, vy, vz, local]
A four item list, containing the vector velocity, and whether the velocity is applied in local coordinates (True) or world coordinates (False)

setLinearVelocity(vx, vy, vz, local)

source code 
Sets the linear velocity applied by the actuator.
Parameters:
  • vx (float) - the x component of the velocity vector.
  • vy (float) - the z component of the velocity vector.
  • vz (float) - the z component of the velocity vector.
  • local (boolean) - - False: the velocity vector is applied in world coordinates.
    • True: the velocity vector is applied in local coordinates.

getAngularVelocity()

source code 
Returns the angular velocity applied by the actuator.
Returns: list [ωx, ωy, ωz, local]
A four item list, containing the vector velocity, and whether the velocity is applied in local coordinates (True) or world coordinates (False)

setAngularVelocity(wx, wy, wz, local)

source code 
Sets the angular velocity applied by the actuator.
Parameters:
  • wx (float) - the x component of the velocity vector.
  • wy (float) - the z component of the velocity vector.
  • wz (float) - the z component of the velocity vector.
  • local (boolean) - - False: the velocity vector is applied in world coordinates.
    • True: the velocity vector is applied in local coordinates.