rollOffFactor
rollOffFactor
sets/gets the rate that the sound falls off (decreases) as the
distance increases.
Type: Float number.
0.0 means no fall
off as distance increases.
The greater the number, the quicker the sound
falls off.
Sample
Code
################# Get rollOffFactor
# get the controller
controller = GameLogic.getCurrentController()
# get the actuator attached to the controller named slam
act = controller.actuators["slam"]
# get roll off factor
rollOff = act.rollOffFactor
################# Set rollOffFactor
# get the controller
controller = GameLogic.getCurrentController()
# get the actuator attached to the controller named slam
act = controller.actuators["slam"]
# set roll off factor
act.rollOffFactor = 0.0
|