For my game I use a sound script that multiplies the speed with the pitch of a sound.
cont = GameLogic.getCurrentController() act = cont.actuators["slam"] obj = cont.owner #speed linVelocity = obj.getLinearVelocity(True) if linVelocity < 0: linVelocity = linVelocity * -1 obj['speed'] = linVelocity * 0.15 + 1 #pitch obj['sound'] = act.pitch act.pitch = 0.7 * obj['speed']
The problem is the that linear velocity screws up the gravity when you use rigid body (which i need).
My question is. How do you get a pitch control on my sound without screwing up gravity?
If you use Dloc the LinV is 0 and will stay 0 if i move. Also problem with Dloc is that it works like a teleports and thats works rather bad with walls (it looks like you drive into a wall and you get pushed out).