Some issues with Unity's networking and players. PAYING!

Hello!

I haven’t posted much lately, in fact I haven’t posted at all lately :smile: But now I come to this irritating issue whilst adding multiplayer support to my game…

Basically, I am following this tutorial:
http://forum.unity3d.com/viewtopic.php?t=30788

and the example project that comes with it.
I do everything step by step, add to my game what ever is added to that example project and everything works just perfect, except for few things…

When one player rotates or plays animation, all connected players rotate and play the animation as well… Basically the local player controls the rotation and animations of all remote players :S

There is no such issue on the example project, and since I practically copied everything from there, just changed character and made it 3rd person instead of 1st person I cannot understand how the hell do I need to fix it :confused:

I then tried to move the camera a little to make that example project 3rd person view, I didn’t change anything besides moving camera up and backwards a little. I built the game and it had exactly same issue with rotation… When I (local player) rotated, all players that were connected rotated as well. I then quickly moved the camera back to it’s original position so it would be 1st person again (0, 0, 0) and guess what? the rotating issue was gone…

Where the hell is the problem? Have anyone else had any similar issues and/ or know how to fix them?
I wouldn’t mind if my game was 1st person (as it works well with 1st person view) but it’s not, it’s 3rd person and I need to fix this badly :frowning:

I’ve spent whole today, which is 7 hours constantly trying to solve this problem and still failed…

Please help me… If you want me to put more info like a web build of game with that issue or post some scripts, just tell me!

Thanks

If needed, I can give you my msn or even use teamviewer for you to look at scripts etc.
Just tell me, please, as I really need to fix this issue :frowning:

I will now give away a Rapidshare Premium account to who ever helps me fix this thing.

I know it’s not hard at all and is probably just common sense if you know any networking. I don’t know much about networking so I can’t figure out to fix it.

There are obvious pitfalls, such as interpreting input and who owns instanced objects etc.

However you are not giving nearly enough information to figure out what you’re doing.

Where is the code that moves your avatars? What step of the linked tutorial is your networking code pulled from? What do -you- think is happening?

People around here are always willing to help, but you have to give us something to chew on.

Hey and thanks for answer.

I don’t know how to explain it clear enough…
Basically, the networking i was adding is exactly same as in this tutorial:
http://forum.unity3d.com/viewtopic.php?t=30788
I practically followed it step-by-step, added everything that was added there, only changed the character…
I think that it’s happening because I’m trying to make it 3rd person instead of 1st person which is by default on that tutorial. Maybe you need to do something differently… As I said, on that tutorial example project I did a small test, all I did was move camera a little so the local box (character) would be visible and when i ran the game it had exactly same issues as I’m having on my project whilst following this tutorial.

I don’t know what’s wrong… As I said, I could allow you to use Teamviewer to look at my project and the scripts so it would be clearer… I don’t know, It’s giving me a headache… :confused:

The camera position should have zero bearing on your input.

Also, that tutorial has a dozen different implementations of networking. You using 2a, 3b, etc?

I am having the exact same issue, using the 4th Example (FPS Example). I am following everything exactly, but I made a custom PlayerPrefab to use.

Are you sure that only your own, local, player is actually using the input to move the player? Non-local players should not use the local machines keyboard&mouse input. I guess you are not properly setting the “isLocalPlayer” setting/boolean right (not sure whats it exactly named like here)

Well I’ve gone back and forth and mimicked the player settings pretty much exactly. There’s a boolean in the Player Script you made called “Local Player” but it’s not enabled for your Example 4, so I disabled it on my end as well.

yup im using 4th fps example too.
if anyone finds a way to fix this let me know :smile:

Well, I’ve managed to reduce the problem greatly. But each player still has control over everyone else models on where it walks. They can’t control the mouse anymore.

How did you remove the mouse controlling issue? :slight_smile:

I deleted the stock MouseLook script and strictly used the one that came with the Example. The Player Script looks for this particular MouseScript, which has some custom code in it.

Is your 3rd person camera following at some arbitrary position and not as a child to the player object? example, if you attached the camera as a child to the player pill then you do not see the rotation or it controling the other players, but if you detached the camera from the player pill and have it using some code to follow the player around you will see the rotation and control of other players, so that said, is the camera still a child of the player pill or is it on its own?

In my game the camera is attached to the chest mesh of the character. It uses a script for mouselook, but that’s it.

Yeah, same here.

@djoscard: When making a game using the Unity tutorials as starters or references, you need to look at every last detail. Trust me, I learned the hard way.

Unfortunately without seeing your script there is no telling what is wrong. Could be a simple missing IF statement, or a fall through select case statement, or even the way your handling the player ID’s through RPC. Obviously something is missing or not typed right.

It’s ok, you can close this topic.

I now have SmartFoxServer Pro with unlimited connections.

Screw unity’s built in networking, too much stress and headache from it :smile:

thanks!