• 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 /
  • Help Room /
avatar image
0
Question by murphyfa · Jan 18, 2016 at 04:57 AM · multiplayerphotonmultiplayer-networkingfirst person shooter

Multiplayer FPS Gun Position - Local vs Networked Client

Unity 5 with Photon's PUN

I'm stuck on an issue where I run an RPC for a player to pick up a new gun. The RPC function works fine, and it mounts the gun to the player's hand. Looks great to other players. After this I want to run another function locally to then move the gun to be a child of the local player's camera. This is so the local player will see the gun on their screen like you'd imagine in any FPS.

This works fine if the RPC is fired with an PhotonTargets.All. The problem is I want to do it with PhotonTargets.AllBuffered so that if a new player joins then they will also see it. Instead, the buffered player they see has the gun mounted to the camera, and basically floating by their head. Once the player is in the game, if someone picks up a new weapon, it works fine.

Am I approaching this from the wrong angle? I have also tried creating a second instance of the gun, mounting that to the local player's camera and then deactivating the held one, but the buffered view of this shows both guns.

Thanks for any help.

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by murphyfa · Jan 18, 2016 at 10:09 PM

Bumping topic.

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

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

54 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 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 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

Raycast over Photon 0 Answers

[PHOTON] Transform not synching correctly 0 Answers

Unity Photon how to show arm/gun movement with mouse to other players.,Unity Photon: How to show arm movement to other players 1 Answer

Build errors when using Photon 2 ,Build errors after using Photon 0 Answers

How do I sync Rigidbody2D over the network? 0 Answers

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