- Home /
Multiplayer FPS Character Model Question
So I've been wondering. I've made an FPS before where there is just a camera, the arms, and the gun. But I want to make a multiplayer game which obviously means there has to be a character model. How does this work? Are the guns and stuff actually part of the character model or is it like where your camera renders only your arms and guns and stuff but you can see other players characters (if that makes sense). Basically, what I'm asking is, how do you make a multiplayer fps with a character where there are animations and such and you can see the other players' characters. I was watching this and it seemed to be what I'm asking how to do.
Answer by xt-xylophone · Nov 06, 2013 at 02:24 AM
Yup you have the right idea. Its done using render layers. Set it up so when you start, your body is set to a layer your camera cannot see and vice-versa for the arms/gun model. Other players are set to always show the body, never the hands. The layers setup is done locally so its always correct on your own machine.
This is also how you can do some swapping between 3rd and 1st person cam if you need. Have a cam behind the player that only renders body layers and one in your head that only renders arm layers.
Alright, this sounds like what I was thinking. I just have to think of how how to do this locally.
I think I got it.
How does this look:
#pragma strict
var fpsView : GameObject;
var tpsView : GameObject;
Screen.lockCursor = true;
Screen.showCursor = false;
//$$anonymous$$ine
if(networkView.is$$anonymous$$ine == true){
fpsView.active = true;
tpsView.renderer.enabled = false;
//Not $$anonymous$$ine
}else{
fpsView.active = false;
tpsView.renderer.enabled = true;
}
Answer by figman123456 · Nov 06, 2013 at 01:49 AM
From what i would think it works exactly the same as single player for the player character but on the other players screen you place a model of that player at there positions so they see you as a character and you see them as a character, but the players character is itself is exactly the same. I'm pretty sure that's how it works, that's how i would do it anyway :)
Answer by jrlowe · Mar 24, 2014 at 04:12 AM
There's also a different, easier way. I'm assuming you don't want to see feet or anything of your character so just have the hand model. The way multiplayer works, the other players don't actually see "you". They render a model representing your location.
Your answer
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
FPS Multiplayer setup - TPS models for other clients 1 Answer
Multiplayer projectiles 0 Answers
Network.Instatiate Problem 0 Answers