The faster the actor, the louder it get. Is it possible?
MarkOnTheIron
Member Posts: 1,447
I would like my actor to play a sound (and that's easy), and i would like this sound volume to be proportional to the actor velocity.
Is it possible?
Is it possible?
Comments
As BeyondtheTech said, you can adjust the music played via Play Music by adjusting the Volume attribute. That you can use a constrain attribute behavior using the actor's velocity as the variable. Again the volume can only have a value between and including 0 and 1.
Here's what I did:
- created attribute VolumeSpeed
- on my moving actor I put behavior Constraint Attribute <VolumeSpeed> to <max(0, min(1, 1*abs( self.Motion.Linear Velocity.X /200)))>
- on my moving actor I put a Play Sound behavior (not Play Music because it sounds better and works with other sounds) and on the volume I put <VolumeSpeed>
And you know what? It worked!