Author Topic: Failed to read past end of stream error  (Read 4777 times)

pretender

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 155
    • View Profile
Failed to read past end of stream error
« on: March 12, 2013, 08:31:37 AM »
i am trying to update camera distance with this code but i get Failed to read past end of stream error what i am doing wrong?:
  1.  void Apply()
  2.     {
  3.         if( smoothMotion )
  4.         {
  5.             distance = Mathf.Lerp( distance, IdealDistance, Time.deltaTime * smoothZoomSpeed );
  6.             yaw = Mathf.Lerp( yaw, IdealYaw, Time.deltaTime * smoothOrbitSpeed );
  7.             pitch = Mathf.Lerp( pitch, IdealPitch, Time.deltaTime * smoothOrbitSpeed );
  8.         }
  9.         else
  10.         {
  11.             distance = IdealDistance;
  12.             yaw = IdealYaw;
  13.             pitch = IdealPitch;
  14.         }
  15.  
  16.         if( smoothPanning )
  17.             panOffset = Vector3.Lerp( panOffset, idealPanOffset, Time.deltaTime * smoothPanningSpeed );
  18.         else
  19.             panOffset = idealPanOffset;
  20.  
  21.         transform.rotation = Quaternion.Euler( pitch, yaw, 0 );
  22.         transform.position = ( target.position + panOffset ) - distance * transform.forward;
  23.                
  24.                
  25.                 tno.Send(2, Target.OthersSaved, distance);
  26.         }
  27.        
  28.         [RFC(2)] void UpdateDistance(float d)
  29.         {
  30.                 distance = d;
  31.         }

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Failed to read past end of stream error
« Reply #1 on: March 14, 2013, 12:59:35 AM »
If 'distance' is a float, then you likely have another RFC(2) somewhere.