- Home /
How to make a gun look different to other cameras?
hi, im using m2hs great fps multiplayer example for my own game. Now i have a little problem. My playerprefab has two guns. One low poly model wich should only be seen from others players fps views and one high poly model wich should only be seen in the fps view from the guy who is playing. I added different layers to the guns wich worked fine for one player. But now of course when another player joins he is using the same player prefab and also cant see the low poly model in the hand of the other player. Only the high poly model.
I simply want the gun to look different from the outside than from the main players fps view.
I also thought about just making 20 different player prefabs an give each one his own layer. But then i would need a character selection menu and make sure that you can select a player only once. But i have no idea how to add a character selection to the network menu where you select and join the servers.
Any ideas?
Answer by efge · Jan 24, 2011 at 09:32 PM
You may take a look at Camera.cullingMask and Camera.layerCullDistances.
hey the Camera.layerCullDistance works great! I just edited the distance to 0.01 and scaled the high poly model extremly small directly in front of the camera.Now the other cameras cant see it anymore. But the player can still see both guns in his hand. How to hide the low poly model wich is close to the fps camera? Thanks a lot