x


need help - networking demo with my character not working

I was able to get the networking demo working with Lerpz character. When i try to replace lerpz in the demo with my own character (by making my own prefab and same scripts), it doesn't work (it spawns my character but other clients cannot see it). I noticed that when I create my own prefab and added Network View, the "Observed" under Network View points to my prefab(transform) but the Third Person prefab in the demo has "Third Person Player (network)" under Observed. How can that be replicated? is there something else i'm missing? (i know this sounds very basic but please help)

more ▼

asked Oct 18 '10 at 05:41 AM

Taruna gravatar image

Taruna
25 4 4 8

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

2 answers: sort voted first

It sounds like there's a ThirdPersonPlayer script that you need to drag to the "observed" slot on the Network view, which is presumably using OnSerializeNetworkView to synchronise the character object.

more ▼

answered Oct 18 '10 at 11:27 AM

Matthew A gravatar image

Matthew A
502 7 9 18

Thanks! that did it. 2 network views took care of the "observed" characteristics. So i added 2 network views and dragged Both NetworkSyncAnimation and NetworkInterpolatedTransform scripts on to the Observed fields. That made it work!

Oct 20 '10 at 03:05 AM Taruna
(comments are locked)
10|3000 characters needed characters left

The observed variable can be changed either in the editor (by simply clicking on it and selecting from the list exactly what component you want to be observed), or alternatively with code using NetworkView.observed.

I'd suggest you check the manual again to understand exactly what's going on under the hood... A good place to start reading about the "observed" property and what exactly it does (State sync) is found here. If you still have a problem, post back...

more ▼

answered Oct 18 '10 at 11:33 AM

Cyb3rManiak gravatar image

Cyb3rManiak
1.6k 1 4 17

(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:

x710
x127
x38

asked: Oct 18 '10 at 05:41 AM

Seen: 1108 times

Last Updated: Oct 18 '10 at 05:41 AM