Marco-Polo tutorial jerky in WP8

Options
Shodhan
edited June 2014 in Any Topic & Chat
Hello,

I am trying to develop a multi player car racing game using photon unity in WP8.I am referring to Marco-Polo tutorial
provided in the plugin.The monster character movement in the phone appears to be laggy and jerky and also the FPS drops down terribly.It works fine in desktop.I also used the interpolation-extrapolation demos to control character movement but the results appears to be same.Could you please help me in this.I had posted the similar issue before.The network character script appears as below :

[code2=csharp]public class NetworkCharacter : Photon.MonoBehaviour
{
private Vector3 correctPlayerPos = Vector3.zero; // We lerp towards this
private Quaternion correctPlayerRot = Quaternion.identity; // We lerp towards this
// Update is called once per frame
void Update()
{
if (!photonView.isMine)
{
transform.position = Vector3.Lerp(transform.position, this.correctPlayerPos, Time.deltaTime * 1f);
transform.rotation = Quaternion.Lerp(transform.rotation, this.correctPlayerRot, Time.deltaTime * 1f);
}
}

void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
{

Debug.Log (">>>>>>>>>OnPhotonSerializeView");

if (stream.isWriting)
{
// We own this player: send the others our data
stream.SendNext(transform.position);
stream.SendNext(transform.rotation);

myThirdPersonController myC = GetComponent<myThirdPersonController>();
stream.SendNext((int)myC._characterState);
}
else
{
// Network player, receive data
this.correctPlayerPos = (Vector3)stream.ReceiveNext();
this.correctPlayerRot = (Quaternion)stream.ReceiveNext();

myThirdPersonController myC = GetComponent<myThirdPersonController>();
myC._characterState = (CharacterState)stream.ReceiveNext();
}
}
}[/code2]

Regards,
Shodhan S

Comments

  • Tobias
    Options
    We can potentially look into the WP8 export this week, I guess.
    Which version of Unity are you using? We know some issues in 4.3 versions, so I suggest only to use 4.5 and up.
  • [Deleted User]
    Options
    We did not find any lags or FPS downgrade on Windows Phone, exporting from Unity 4.5.
    Which WP8 device do you use? Which Unity version and WP8 system do you have?