Quantcast
Channel: Questions in topic: "gun"
Viewing all articles
Browse latest Browse all 592

How to setup gun shot sound using only animator

$
0
0
Im using Unity 2018.4.20f1, this is the version required to produce content for "Vrchat". vrchat doesnt allow many custom scripts so i need to figure out a way to do this using only animators, i have a basic idea but i cannot seem to make it work. From Entry i have a blank state with no animation and a Enabled state that has a animation the length of the gunshot sound. I have a transition from the blank state to the enabled state, they have no exit time or fixed duration. with the conditions of (If revolver = 1 ) and ( if trigger pulled = 1 ), from there they transition to the animation and it plays the sound, however i need two things to happen, if i let go of the trigger, and pull it again whilst the sound is still playing i either need it to stop playing the sound and start it again or play the sound again while its still playing originally. to do this i think i need to use Interruption but im not sure how to set it up. Any help is appreciated.

Viewing all articles
Browse latest Browse all 592

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>