• 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
Question by HSMInteractive · Nov 06, 2013 at 01:30 AM · networkingmultiplayerfpscharactermodel

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.

Comment

People who like this

0 Show 0
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

3 Replies

  • Sort: 
avatar image
Best Answer

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.

Comment
HSMInteractive

People who like this

1 Show 3 · 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 HSMInteractive · Nov 06, 2013 at 11:04 PM 0
Share

Alright, this sounds like what I was thinking. I just have to think of how how to do this locally.

avatar image HSMInteractive · Nov 06, 2013 at 11:12 PM 0
Share

I think I got it.

How does this look:

 #pragma strict
  
 var fpsView : GameObject;
 var tpsView : GameObject;
 
 
      Screen.lockCursor = true;
      Screen.showCursor = false;
  
      //Mine
  
      if(networkView.isMine == true){
         fpsView.active = true;
         tpsView.renderer.enabled = false;
  
         
      //Not Mine
      }else{
         fpsView.active = false;
         tpsView.renderer.enabled = true;
         
 }
avatar image thingimibob · Mar 23, 2014 at 06:13 AM 0
Share

Take a look at fps kit 2.0 multiplayer

avatar image

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 :)

Comment

People who like this

0 Show 0 · 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

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.

Comment

People who like this

0 Show 0 · 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

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta by June 9. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Follow this Question

Answers Answers and Comments

19 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity networking tutorial? 6 Answers

using google drive for storing the leaderboard info and other players data files 1 Answer

FPS character, full body or just arms? 2 Answers

UNet Multiple Characters 0 Answers

Shoot Projectile Where Camera Faces [PLEASE HELP!] 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges