Linear sound and velocity issue
I need some help with sound and motion. I am using the Windows version and i have created a rule to play a sound if self.motion.linearVelocity.x is > 1. This is fine while the actor moves from left to right however when it moves the other way the sound won't play.
I have searched the forum and from what I can see this is correct.
I have searched the forum and from what I can see this is correct.
Answers
attribute:
speedTrigger = 1
rule type 1 (x plane only):
if speedTrigger < abs(motionLinearVelocity.x)
rule type 2 (x and y plane):
if speedTrigger < magnitude(motionLinearVelocity.x , motionLinearVelocity.y)
Velocity is not speed, but instead a vector quantity. Go here for the difference:
http://www.physicsclassroom.com/class/1dkin/u1l1d.cfm
A further question how can I get the sound to change as an object changes speed i.e rolling up and down hills?