Quantcast
Viewing latest article 23
Browse Latest Browse All 164

footstep sound effects sprinting fix

so i have this *very bad* code of a footstep sound effect that activates a sound each step when grounded but thats it, ive tried researching on how i can multiply the sound each step when sprinting but i couldnt find any solution, any tips on how i should go with this? what code should i add to mutiply the sound when sprinting? public Rigidbody rb; public playermovement movement; public AudioSource audioSrc; void Start() { rb = GetComponent(); movement = GetComponent(); audioSrc = GetComponent(); } void Update() { if(movement.isGrounded == true && rb.velocity.magnitude > 2f && GetComponent().isPlaying == false) { GetComponent().Play(); } }

Viewing latest article 23
Browse Latest Browse All 164

Trending Articles



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