Hello everyone,
In my game, every Player object has a Network Object attached to it and an Audio Source. When I move a player I call PlayOneShot method for playing the audio.
My problem is, this is only heared on the client that calls this method. Is there a way for all clients to hear the sound of movement whan a player is moving. It could probably be done with RPCs, but is there a different/better way to do it?
Hi there, I think you can use update method for player sound.
I guess, every PlayerObjects have a NetworkTransform component, so you can check player’s position in update method and call “PlayOneShot” if there is changing.
Don’t use “IsOwner or IsServer” condition for this action.