AOIEntryPoint Jitter

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

LuffyGray
Posts: 32
Joined: 06 Feb 2017, 16:01

AOIEntryPoint Jitter

Postby LuffyGray » 13 Feb 2017, 11:53

I've finally managed to get movement into some kind of working order but I still have an issue where a remote player will enter another players AOI and seems to float/jitter on the Y axis for a few seconds then settles down back on the floor and walks perfectly fine for the rest of the duration.

Is there any particular reason why this may be occuring?

C#, Unity 5.5.1f1, SFS 2.12.2

Spawn Code, Only the Y axis seems to be an issue

Code: Select all

         SpawnRemotePlayer (
            (SFSUser)_userData,
            new Vector3 (_userData.AOIEntryPoint.FloatX, _userData.AOIEntryPoint.FloatY, _userData.AOIEntryPoint.FloatZ),
            Quaternion.Euler (0, (float) _userData.GetVariable("rot").GetDoubleValue(), 0)
         );


*Edit:
I've given the values a wee check since it's using a modified version of the MMO demo and it seems that the values show no differences which is a bit confusing to why there would be any jitter as if the character is battling with multiple Y values are instantiation.

Image
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: AOIEntryPoint Jitter

Postby Lapo » 13 Feb 2017, 14:10

You should check if the Y values received from the server are correct (which should definitely be).
If that's the case then the "jitter issue" is likely caused by the rendering of the objects... although I can't imagine why that would happen...

I'd recommend debugging the code responsible for setting the avatar's coordinates and make sure it's not being called multiple times when it's not necessary or something like that...

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
LuffyGray
Posts: 32
Joined: 06 Feb 2017, 16:01

Re: AOIEntryPoint Jitter

Postby LuffyGray » 13 Feb 2017, 14:33

Lapo wrote:You should check if the Y values received from the server are correct (which should definitely be).
If that's the case then the "jitter issue" is likely caused by the rendering of the objects... although I can't imagine why that would happen...

I'd recommend debugging the code responsible for setting the avatar's coordinates and make sure it's not being called multiple times when it's not necessary or something like that...

cheers


I checked the variables and they were fine, I ended up having to change the inital transform set from lerp/slerp to just a direct variable set as well as run the position uservariables to an Update() instead of a FixedUpdate(), that seems to have got it working smooth.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 128 guests