playMaker

Author Topic: (renamed) Lerp is bugging out.  (Read 2442 times)

Red

  • Hero Member
  • *****
  • Posts: 563
(renamed) Lerp is bugging out.
« on: December 03, 2012, 07:52:49 PM »
So, i've been following the networking example in the test lab and i've been able to successfully adapt that to my own game (i do plan on making it different than what comes with the test lab, this is mainly so i can get my feet wet with networking more than anything else.)

So, spawning is set up correctly, i've got the camera linking up to the correct player object, it's behaving...

thing is, i've set up the rotation data to be transferred over the network in much the same way as the movement data is transferred so as to have the player object turn as it is directed (and be reflected on the other screens/instances) but it seems jerky... is this a downside to the way that the networking occours? is this a downside to the way that Playmaker handles the networking?

don't get me wrong, i'm really jazzed that i've been making strides in this respect (and i do plan on taking this further when i am able to) but i'd like to know if this jerkiness/lag is just one of those things i'm going to have to deal with.

again, this is my first foray into networking though... so, i know that there's more that i could know, i'd just like to know if this is a limitation of the beast or if there are ways to increase the responsiveness/reduce the lag between game instances.

(does it have anything to do with the "failed to send remove RPCs command to network" command in the "networkViewRemoveRPCs.cs?")
« Last Edit: December 03, 2012, 09:12:36 PM by Red »

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Networking: Data is jerky
« Reply #1 on: December 03, 2012, 08:50:39 PM »
Also, i've tried adding the lerp functions for the vector 3 in much the same way as the movement... and that does help make it look smoother in most cases but when it has to deal with the angle when the player moves upwards (using the smooth look at direction in the movement) it tends to have the angle when it's at rest being 359.999 degrees in the Y axis which when it finally settles, makes the lerp go a full 360 in the opposite direction (which is also jarring to the viewer.

do you think that thing where it does the rotation is a side-effect of the "smooth look at direction" action?

i have almost zero familiarity with quaternion rotations but would it be possible that this lerp could be made to work with quats as well (assuming that that would address this issue, i mean.)

sorry for the excessive chatter... but i'd like to be able to address these issues before i get ahead of myself but i'm trying to give as much information as possible as to what's happening and what i've done to address it.

Red

  • Hero Member
  • *****
  • Posts: 563
(renamed) Lerp is bugging out.
« Reply #2 on: December 03, 2012, 09:12:01 PM »
Okay, after puttering around with the lerp on the rotation i've been able to get it to look smooth enough... but that leaves me with that whole "spinning in place if the angle is off by a few degrees" thing... so, i've renamed this thread so as to see if that can be addressed.

at best, the description of what i'm encountering is that as you're moving in a particular direction, if the orientation settles at something like 359 degrees, it'll spin all the way down to 0 degrees which essentially makes the character look like it's doing a pirouette when they stop.

i've been able to reproduce this when they're moving up from a "facing down" angle (so, essentially it's at 180 degrees in the y axis) and when they have settled in the "facing up" angle, it's doing that spin... i think it's because the direction it turns in the smooth-look-at action is clockwise... the same when going from either left to right or right to left (i have seen it happen but i didn't pay too much attention to it)

i think this is a combination of the two actions but the root is in the "smooth look at" action in the way that it determines which direction to turn to face the direction that it's meant to go in. any workarounds i'd be glad to try so long as it is useable in the end.
« Last Edit: December 03, 2012, 09:17:06 PM by Red »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: (renamed) Lerp is bugging out.
« Reply #3 on: December 11, 2012, 04:26:11 AM »
Hi Red,

 What feature are you using exactly to turn? The smooth look at should not spin, so I think that you may have an issue in your feedback loop more than in the look at function itself.

 Could you share the player prefab so that I can look at it? ACtually, is this something that you experience as well within the  playmaker network sample to begin with?

bye,

 Jean