Search Unity

C# - Rendering players per camera

Discussion in 'Scripting' started by StickyKeyStudios, Nov 21, 2014.

  1. StickyKeyStudios

    StickyKeyStudios

    Joined:
    Jun 23, 2014
    Posts:
    33
    Hello,

    I'm making a first person game in which players will have their camera at their head, but if you look down your camera looks into your body, which obviously should not be happening. How can I make the camera render certain objects, without using layers? I don't want to use layers because I have to be able to use more then 32 layers if I were to use layers for this task.

    (One multiplayer connected player would require 2 layers - One layer to set what everyone else should see, and one to set what they should not see. Obviously If I were to allow my game 16 players, that's 32 layers, and the first couple are already taken)

    Thanks in advance
     
  2. hpjohn

    hpjohn

    Joined:
    Aug 14, 2012
    Posts:
    2,190
    Isn't is 2 layers? one for "Me" and one for "Others"
    Alternatively you could just disable the players renderer in the client, and NOT make it an RPC