x


Multiplayer| Attaching camera to player (if i am the owner

i have multiplayer game. i have MainCamera placed in Hierarchy, and player based on prefab. i want to attach the camera to the player and make me able to move it (by "MouseLook"), IF i'm the owner of the player prefab (isMine).

more ▼

asked Aug 02 '12 at 10:24 PM

DLGScript gravatar image

DLGScript
0 4 11 13

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

http://unity3d.com/support/resources/example-projects/networking-example

http://download.unity3d.com/support/resources/files/MultiplayerTutorial.pdf

These should have the answers you're looking for. Ultimately, there are quite a few ways to do this, but what you want to do is assign the input to a character, not the character to an input, since it works much easier that way.

In other words, when you connect the player, add a client-side script to access and modify controls, then have that send and synchronize with the network's stuff. What you're asking about is how to go from the network view to figure out individual inputs, which there is no method for.

more ▼

answered Aug 06 '12 at 06:24 PM

DESTRUKTORR gravatar image

DESTRUKTORR
831 3 5 10

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3008
x806
x710
x702
x681

asked: Aug 02 '12 at 10:24 PM

Seen: 401 times

Last Updated: Aug 06 '12 at 06:24 PM