HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: ADV_LerpCamera doesn't work for a brief period after spawning to location  (Read 1130 times)

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile

Has anyone noticed this? Right after spawning/teleporting to a new area, the ADV_LerpCamera ignores drag rotation. I've been looking into it, and found out that during this brief period ADV_DragRotateTimer_tick method doesn't get called. Anyone expiriencing the same thing?

Cheers
Logged

JoshHalls

  • Founding Professional
  • *****
  • Posts: 335
    • View Profile
    • The Repopulation

Yes/No. Do you have a lot of network calls coming in as they zone in? $Edit calls along with marshaling? We had this issue and remove most of the offending bits of code I mentioned and I think we have gotten rid of it for the most part. Marshalling we changed over to using node replication instead and the $Edit calls are all now done client side with basic node replication and so far I haven't seen it in awhile. I have noticed at times when the lag is really bad it would pop up, but haven't had a chance to see if it happens as we got rid of more edit calls a few days ago fixing some other issues.

Other areas we noticed this happening was in GUI animation timers (things used to fade out a window, move it smoothly, etc) and sometimes with NPC nameplates and animation issues, etc. I think we just about have it all cleared out now.
Logged
Co-Owner/Programmer - The Repopulation

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile

I noticed this every time even teleporting to a clean test area and it lasts around 2-3 seconds.

If you put this into the camera code, you'll notice that during this period the timer doesn't tick:

method ADV_DragRotateTimer_tick()
  println ("Tick")
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1155
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG

In the timer methods used for keeping track of when to do things, the _tick() methods are called when the timer is done ticking (reached 0). An example can be seen in server side script E_CommonCharacterClassMethods at the bottom of script:

Code: [Select]
method E_deathTimer_tick()
  me.ApplyLife()
  me.E_deathTimer.stop()
.

Here we see the timer applying life to the player or NPC after the timer is done ticking.
Logged

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile

Well, i'm 100% sure that the timer was started, but it seems that during the area initialization the timer execution gets delayed for some reason/mechanic that I cannot know.

This is mildly disappointing, but not enough to obsess about.

Cheers!

method ADV_DragRotateCamera( cam as NodeRef , fy as Float , fx as Float , fz as Float )
 
  if me.ADV_DragRotateTimer.timerState == OFF
    me.ADV_DragRotateCurrentLERPPosition = (0,0,0)
    me.ADV_DragRotateDesiredEndPos = (fy,fx,fz)
    me.ADV_DragRotateStartingCamRot = GetNodeRotation( cam )
    me.ADV_DragRotateTimer.fireRate = 00:00:00.002
    println ("START Timer") <---   THIS PART OF CODE GETS EXECUTED!!!
    me.ADV_DragRotateTimer.start()
  else
    //timer was running stop it and change values
    me.ADV_DragRotateTimer.stop()
    me.ADV_DragRotateStartingCamRot = GetNodeRotation( cam )
    me.ADV_DragRotateDesiredEndPos = (fy,fx,fz) + (me.ADV_DragRotateDesiredEndPos - me.ADV_DragRotateCurrentLERPPosition)
    me.ADV_DragRotateCurrentLERPPosition = (0,0,0)
    println ("STOP START Timer")
    me.ADV_DragRotateTimer.start()
  .
.
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online

Most likely some other code that is slamming the client, blocking the drag input from being pushed to the server.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]