- Home /
Make so that a player cant see the players model?
Hi, I would like to know how to make so that a player cant see their own player model and that others can see another players model. I have tried using layers to do this but that starts being annoying and clunky when you have 15 players at once.
You can use just two layers for all. Use the OnPreRender and OnPostRender methods for a camera script to change the layer of the player object.
thanks, but I don't really get it can you show me some screenshots or something?
You have two layers: RenderOther and RenderSelf. All player objects are in the RenderOther layer. Each camera's culling mask includes RenderOther but excludes RenderSelf. Now, for each camera, add a script with the OnPreRender and OnPostRender methods. In OnPreRender, you change the player object's layer associated with that camera to the RenderSelf layer. In OnPostRender, you change it back to RenderOther.
Note that you shouldn't have any colliders on the player object that has it's layer changed constantly.
Answer by SharkoFR · May 06, 2018 at 11:52 AM
make layer for player model and disable this layer on player camera
that's what I have tried but when having sooo many players in a match it will be very clunky and i will have to have a layer for every person
Your answer
Follow this Question
Related Questions
How to make a camera work in this circumstance. 1 Answer
Hiding model for local player 1 Answer
Camera attached to the wrong player 1 Answer
DontDestroyOnLoad() Unity 3D 0 Answers
Network fps swap cameras 1 Answer