Hi. I am to design sound for a little racing project. So far, I’ve learned how to design engine sounds with FMOD and use it in UE4. However, I still don’t know how to implement crash sounds. I lack a lot in terms of blueprint knowledge (I don’t know all the nodes I should). Can someone please give me a hint for triggering a crash sound when a car bumps into something?
event hit is a node that may be useful in this situation. it fires whenever your collision runs into another object.
I’ll check it out. Before I do, can you tell me if this event measures the velocity of the hit so I can trigger different samples with it, like light bump or huge crash?
There should be a node called Get Velocity for actors
I tried using event hit. Now, my problem is that the event spawns sounds at rate of a submachine gun. I connected the hit values to print string so I could see the values. They keep changing. Is there a way to spawn a sound once when the hit value is between X and Y?
The reason for the constant sounds are probably because the ‘Event Hit’ keeps getting triggered. What is your solution for when there is a crash? Is the vehicle pushed back, can it continue forward, is it set to bounce back but then continue forward again?
This is more of a logic issue and can be solved multiple ways. One simple way is when there is a hit event triggered, make a variable that will stop it triggering again until after a delay. This isn’t the best but should stop the machine gun noise. The other methods involve making sure that the crash isn’t possible to fire every frame that the vehicle keeps colliding, which may mean pushing apart the two objects when they collide.
I am designing the sound in a project based on the vehicle preset. Thus, I don’t know how the physics work and I don’t know which properties to alter in order to fix my issue. However, I’m supposed to be given a nice and detailed vehicle provided by I-hope-to-be-my-future-employer. So far, I’m just trying to figure out how to program sound. When I get the new vehicle, I’ll focus more on details.
I tried using DoOnce which is reset by a .2s delay. Still doesn’t sound satisfying. I’ve been focusing on racing games like Forza or Need for Speed for some references, but the problem is I can’t recreate the programming well.
Your DoOnce is probably a decent approach for now, so that it doesn’t go machine gunning. However, 0.2s still allows 5 of the sounds to play in a second. Try and determine how quick you’d expect the object to be able to rehit and reset based on that. Simply extending the time should be better for now.
I’ve not used the Vehicle preset, so I’m also not sure on those collisions, but on your vehicle, try and add an impulse to your car in the opposite direction of the normal from the hit event. That way, you will bounce back a bit when hitting an object so are less likely to continually cause the hit event each frame.