Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 Braveheart · May 05, 2013 at 05:02 AM · networkingfpsweaponsnetwork instantiate

Adding objects on player models in a multiplayer game

I'm trying to figure out the best way to go about this: I want each of my multiplayer game avatars to be able to have weapon/item models on their person when they have each of these specific items/weapons. E.g. if they have a crossbow holstered, a crossbow model would show on their back.

I'm trying to figure out if it's better to either:

A. Attach each item/weapon model to all possible positions (holstered on back and equipped in hands) then just send an RPC with which one to enable and which one to disable when required; or

B. Instantiate across the network the object at either the holstered position or the equipped position then destroy it and re-instantiate it at a different position when required.

Am I right in thinking the best solution is going to be A? Is there a better way to handle this?

Comment
Add comment · Show 3
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 FL · May 05, 2013 at 01:55 PM 0
Share

I should define in each model a method for every part like "Equip in hand", "Equip in head" that receive the object and adjust the coordinates and the parent of equipping in these parts (only one position/rotation per method).

This way, if you have 10 body positions, 1000 models and 1000 objects, you only need to define 22000 coordinates (position and rotation)

There ways to make it only using one method (but with same number of coordinates) if you know how to use Enums.

avatar image Braveheart · May 05, 2013 at 04:08 PM 0
Share

So you mean define the points on the model where each item/weapon would sit, then create the object and just move it's location?

avatar image FL · May 05, 2013 at 04:30 PM 0
Share

Yes! In the object just make default position and rotation values using Instantiate() with one parameter.

0 Replies

· Add your reply
  • Sort: 

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.

Follow this Question

Answers Answers and Comments

12 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

Related Questions

Network Manager NetworkServer.Spawn isn't working 0 Answers

Multiplayer FPS Character Model Question 3 Answers

Network.Instatiate Problem 0 Answers

Player Weapon Scripting 1 Answer

How to make Recoil Dampening aka. Recentering? 0 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