Currently I have a nice simple single player FPS, however I would like to make a simple multiplayer game with it, just to get to grips with Unity before making a larger project. I looked into Photon however I felt I still needed to learn more about Unity and its inner working, I’m going to revert back to its default networking, plus I like the ideas of letting people run their own servers.
Now I know its probably very simple however I’m getting my self into a muddle.
Now I have two prefabs, one what the player see’s, FPS view then a proxy prefab, what the people looking at each other will see.
This is untested, I’m trying to design everything first, for all I know everything could work fine
Now with it obviously makes the FPS view for the player connected and proxyPlayer for everyone else to see.
OnNetworkInstantiate
if (networkView.isMine) {
Network.Instantiate(playerPrefab, pos, transform.rotation, 0);
}
else {
Network.Instantiate(proxyPrefab, pos, transform.rotation, 0);
}
Now what I’m having problems with is, how can I get the proxyPlayer prefab only communicate with the player it represents, I want to comminucate between the playerPrefab like position and the animation that needs playing, however like I said before it only needs to communicate with the player its representing, I don’t know any function which could help.
I was thinking at first making a script for the proxyPlayer and enable userinput if the networkview is theirs,but it doesnt create a proxyplayer if the networkview is theirs.
Look ive got myself in a muddle just trying to explain it.
Thanks for the help. Sorry if this is worded bad, just ask questions and ill explain as much as I can.