- Home /
How do I update player tilt in multiplayer?
Hey! I've started working with multiplayer and I've got the basic client-server setup working and now I'm trying to add weapons. My player prefab is set up as a capsule that handles movement forward, back, left, and right as well has rotation left and right (around the y-axis). When the player joins the game the main camera childs itself to the capsule and activates a script on itself that allows for tilting up and down (around the local x-axis). When the player selects a weapon the script first checks to see if the camera already has any children and deletes them, then Network.Instantiates the selected weapon as a child of the main camera.
At this moment, all players can see each other move. However, they cannot see when other players have weapons. How do I go about this? does the camera need a networkView? the weapon prefabs already have a networkView.
I solved it myself by using $$anonymous$$2H's script via gamer to game developer's tutorial. I just added a script that whenever the weapon moved/rotated it sent an rpc to all other players on the network. (how do I answer my own questions?)
$$anonymous$$ore information on this would be appreciated... I'm also doing a multiplayer photon game and i'm unsure how to proceed... i'm thinking about an extra bone I parent multiple objects so all weapons animate off the same bone?