PUN Interpolation

Zaddo

Active member
I am trying to understand how interpolation works with the PUN integration pack. From what I can work out, it appears to be the Remote Interpolation Multiplayer, m_RemoteInterpolationMultiplayer, property on PunCharacterTransformMonitor, is the only parameter to control interpolation.

This controls the percentage movement distance between current position and the network position. Is this correct?

In my testing the default value of 0.5 is very smooth, and a value of 1 or above turns off interpolation.

Is it also correct to say that the interpolation will not follow the path of the packet data positions that have been received if there is more than one to catch up to? i.e. if transforms current position is n-2 packets from the current network position, the transform will be moved directly to the most current network transform position, ignoring in between steps? Not that I can really see an issue with this, but just want ensure I am interpreting how this works correctly.

What is the recommended setup for smooth movement over a network with 30-100ms latency?

I did search forums and doco for info on this topic. I couldn't find anything. Sorry if I missed this if it has already been answered somewhere.
 
Last edited:
Is it also correct to say that the interpolation will not follow the path of the packet data positions that have been received if there is more than one to catch up to? i.e. if transforms current position is n-2 packets from the current network position, the transform will be moved directly to the most current network transform position, ignoring in between steps? Not that I can really see an issue with this, but just want ensure I am interpreting how this works correctly.
That is correct. When the PUNCharacterTransformMonitor runs it will use the latest position in order to determine where to move to. From there it does a simple lerp from the current position to the target position. This is why a value of 1 turns off interpolation.

(thanks for leaving a PUN review :) )
 
That is correct. When the PUNCharacterTransformMonitor runs it will use the latest position in order to determine where to move to. From there it does a simple lerp from the current position to the target position. This is why a value of 1 turns off interpolation.

(thanks for leaving a PUN review :) )

Thanks I appreciate the quick response. (Also apologies for putting wrong name on review, I correct it ... ooops)
 
Hi if I use 0.5 interpolation the multiplayer movement will be smooth right? is this working till now?
 
I recommend giving it a try and seeing if that value works well for your project :)
 
Top