Synchronization in Unity3d

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

tigs
Posts: 7
Joined: 25 Jun 2009, 12:43
Location: plymouth

Synchronization in Unity3d

Postby tigs » 25 Jun 2009, 13:45

Hi I apologise in advance for asking a question that has in some way been asked and answered a few times before, but I need to ask it of you all again as I am finding the concept difficult to understand.

I have an animation of sliding doors that I made in 3dsmax. In unity I have triggered the animation when a person walks up to the doors and it opens ok.

However other users in the environment can’t see that animation, only the person that triggers it can.

just to say that I have looked at the unity forum and the sfs forum and have gleaned that I need to synchronize that animation to the other clients in some way.

I tried network view in unity until I began to realise that I might be that I need to use sfs code to make the rpc. I openly admit I’m not the best coder but am working now with someone that is much better than I and is at least very competent in xml and actionscript, yey.

however nether of us know where to start on this. I have looked at the code on the localplayer in the sfsIslandDemo as it seems to me that the code on there tells the clients where the other person is and what animation they are doing, but even then we can’t see how the whole thing connects together.

I am also unsure of the correct terminology to use when discussing this so that might also be causing us a problem.

I realise that we are in the deep end but we should be able to figure things out once we are pointed in the right direction. We have no option but to accomplish this so that is the best incentive we can have.

Any help here very gratefully received.

if you can point me to a thread that discuses it in more detail, or a tutorial of a more step by step nature that would be realy appreciated.

many thanks tigs
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 25 Jun 2009, 20:11

Hi - just have a few minutes (leaving on mini-vacation in 7 hours and havent packed or slept yet...)

The "secret" class to look for in the island demo is the Game/Scripts/network/AnimationSynchronizer.cs file

It uses a SendObject to send out "I started an animation" message to all other clients.

Hope that helps you along

/Thomas
tigs
Posts: 7
Joined: 25 Jun 2009, 12:43
Location: plymouth

Postby tigs » 26 Jun 2009, 09:13

Thanks for your pointer Thomas and hope you have a fab vacation.

If anyone else would like to add to the information Thomas has put forward please don’t feel it would be a waste of time as we would be happy to receive any information that would help us to contextualise the code.

just to expand on what we are trying to achieve. We are e-learning developers for a medical and dental school in Plymouth UK and we are hoping to make a 3d dental school to help our students become familiar with their environment.

We won’t be making money out of this, we only hope to help our students expand their understanding of the environment they will be in.

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 1 guest