• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Bipolar_Dragon · Aug 23, 2016 at 07:39 AM · cameramultiplayer1st person

How do I make it so that a FPS camera cannot see it's own playerModel but can see everyone else + Full Body Awareness

This is to make so that in a first person shooter game, the user controlling his own player character won't actually see his own character model, but he can see his friend's player characters and vice versa.

Although I've seen people put the player character's camera slightly in front of the 3d model, I would like to how say CSGO does it because I think CSGO and other FPS games simply have their cameras inside the player model.

Also how would one also implement full body awareness (Look down see your legs)while using this system?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Hanoble · Aug 24, 2016 at 08:07 PM 1
Share

You can put the player model on a layer so that the owner's camera cannot see their own model, but ins$$anonymous$$d can only see the arms and hands (possibly legs if you want them) model like most FPS games. You can learn more about that here:

https://docs.unity3d.com/$$anonymous$$anual/Layers.html

4 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by NFMynster · Aug 26, 2016 at 08:31 AM

Yeah, check if the player is the local player and hide the model if not.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Rob2309 · Aug 24, 2016 at 07:00 PM

An easy solution would be to give your player a model which only includes the parts of the body you want to be able to see. This is probably the way most games do it (correct me if I'm wrong). If your game is an online game, you should choose the appropriate mesh for the player you are spawning (Mesh with only arms if the player is the local player; Mesh with entire body if the player is some other client). This is how I would do it, but there are certainly different solutions, I hope I could help :)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by iuripujol · Feb 19, 2018 at 11:33 AM

https://drive.google.com/open?id=14pbaelY8hQM7frhMNYIEkf_DDlds3ub_

This is just a small sample of my work regarding parkour mechanics in FPS with full body awareness.

Contact me if you need some help: iuripujol@gmail.com.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image PIYU5H · Aug 06, 2020 at 09:25 AM 0
Share

Hey man , help me I also suffering from this problem But you delete this sample fps with full body awareness, I need that as help plz provide it me, Thanks

avatar image
0

Answer by Aditya2581 · Jul 21, 2020 at 02:37 PM

to solve this issue a trick of layer masking is used. 1) change layer name of guns and hand to something like "PlayerCanOnlySeeThis". Do not select the legs as you don't want to see your own legs. 2) Add a camera to the position and in the inspector change the clear flags to "Depth only" and culling mask to "PlayerCanOnlySeeThis", and Depth to 50. (What this will do is render only the objects with this layer on top of the main camera) 3) Use another camera in that same position so see the world and under the culling mask deselect the "PlayerCanOnlySeeThis".

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image chunkymeat9000 · Jan 13 at 07:28 PM 0
Share

What do you mean by "add a camera to the position" and "in the inspector change the clear tags to depth only"? what clear flags?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Photon IsMine not working? 1 Answer

How to Seperate Multiplayer Characters? 1 Answer

Have Camera Render First Person Arms But Not Body. 2 Answers

Multiplayer - Players have wrong cameras 1 Answer

2 players 1 game field in shooter/card game 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges