velocity
velocity
gets/sets the velocity this sound is moving at.
Type: list [ vx, vy, vz]
Note:
Pitch
is determined from the velocity.
Sample
Code
############ Get velocity
# get the controller
controller = GameLogic.getCurrentController()
# get the actuator attached to the controller named slam
act = controller.actuators["slam"]
# get the velocity
vel = act.velocity
############ Set velocity
# get the controller
controller = GameLogic.getCurrentController()
# get the actuator attached to the controller named slam
act = controller.actuators["slam"]
# set the velocity
act.velocity = (50.0, 0.0, 0.0)
|