x


Multiplayer Problems

Hello, I'm trying to do the multiplayer tutorial found here : http://download.unity3d.com/support/resources/files/MultiplayerTutorial.pdf/

I'm running into a lot of troubles though. I'm trying to use all the code from that in a First Person Shooting game but when I move the player on the other client moves with me and same with them, when they move it just moves me instead of the designated object for the 2nd player. Are there any good fixes for this? Please help I'm confused about this I've tried everything within my knowledge to fix the problem but no avail.

more ▼

asked Jan 15 '12 at 08:43 PM

twoface262 gravatar image

twoface262
129 40 52 55

"It is incredibly complicated" There is no easy solution for multiplayer or networking. Start with a VERY SMALL system and see what you can figure out! I feel that example you mention is way to complicated to begin with.

Jan 15 '12 at 10:24 PM Fattie

I followed it directly. I have a decent ammount of experience in unity I know the error is in this code.

using UnityEngine; using System.Collections; public class RigidAssign : MonoBehaviour { void OnNetworkInstantiate (NetworkMessageInfo msg) { if (networkView.isMine) { NetworkRigidbody _NetworkRigidbody = (NetworkRigidbody)GetComponent("NetworkRigidbody");

    _NetworkRigidbody.enabled = false;

           }
    else {
       NetworkRigidbody _NetworkRigidbody2 = (NetworkRigidbody)GetComponent("NetworkRigidbody");

       name += "(Remote++)";

      _NetworkRigidbody2.enabled = true;
                    }

} }

I'm just unsure on how to fix it.

Jan 15 '12 at 11:23 PM twoface262
(comments are locked)
10|3000 characters needed characters left

0 answers: sort newest
Be the first one to answer this question
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:

x4142
x3721
x3446
x699
x681

asked: Jan 15 '12 at 08:43 PM

Seen: 669 times

Last Updated: Jan 15 '12 at 11:23 PM