Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
Zac_

Multiplayer Player Sounds

Question

Heyy guys, so im working on my multiplayer fps project...i

 

Im trying to add third person footsteps and gunfire audios...but, when i send an RPC (on the player object)...i expect it to work... but it doesnt matter where i stand, its the same volume level... Am i doing this wrong?  It seems like it should play the audio, using the audio source on the player...just cant get it to work..can anyone help? ?

 

Thanks in advance! 

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
Please login or register to see this quote.

Thanks for the thought, still is the same volume though, doesnt matter where i am in the map...

Share this post


Link to post
Share on other sites
  • 0

how exactly you play sounds?
show us code

 

and check what is going on with your audio source in editor(in play mode).

Maybe you change spatial blend via code, or something wrong with your 3d audio settings (and you should adjust distance and rolloff)

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

Code I use:

 

Please login or register to see this code.

I assume it should just play the sound off the player object for all clients...not sure, i'll have another play around with the hierarchy settings.. post if it works..!

Share this post


Link to post
Share on other sites
  • 0

Check your audio source settings.

P.S. There is no need to send RPC's to play footstep sounds (especially when you use PUN with message limit).

Just slightly modify your footstep script, or write separate script for remote player.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×