Missing Teleport() or Reset() function in PhotonTransformView

Hi,

In PhotonTransformView, m_StoredPosition is set to the transform position in Awake() only.
If we teleport the object somewhere else (which we do in our game since we reuse a pool of GameObjects), m_StoredPosition is not reset to a correct value, and the next time there is a synchronization the direction will be computed using a wrong position, and thus the extrapolation on the receiving side will be wrong.

Adding this Reset() function to PhotonTransformView and calling it after the teleport fixed the weird movements issue we had:

public void Reset()
{
	m_StoredPosition = transform.position;
	m_NetworkPosition = transform.position;
	m_NetworkRotation = transform.rotation;
}
Could you consider adding a similar function?
Or maybe there is already another solution to this problem and I haven't found it?
Thanks.

Comments

  • Bump? I'd rather not have to patch PUN after each update :).
  • For anyone interested, it seems that a fix for this issue was put into PUN 2.10.
Sign In or Register to comment.