Game Object: angularVelocity

angularVelocity
  • Get/set the object's initial angular velocity

Type:

  • float list [ x, y, z ]
    • x = angular velocity around the x-axis
       
    • y = angular velocity around the y-axis
       
    • z = angular velocity around the z-axis 
Range:
  • 0.00 to 57,295.78 degrees
Note:
  • Physics Type: Rigid Body and Dynamic
Sample Code

################## get the game object's angular velocity
 
# import bge
import bge

# get controller
cont = bge.logic.getCurrentController()

# get object that controller is attached to
obj = cont.owner

# get the angular Velocity
angVel = obj.angularVelocity

Sample Code

################## set the game object's angular velocity
 
# import bge
import bge

# get controller
cont = bge.logic.getCurrentController()

# get object that controller is attached to
obj = cont.owner

# set the game object's angular velocity
obj.angularVelocity = [ 0.0, 0.0, 10.0]