Hi! I have an issue with AnticipatedNetworkTransform.Smooth() method from NGO 2.0.0 pre3
I have created a very basic project - upon connecting to host both Client and Host can anticipate to move the Circle object “Enemy” by holding the left mouse button. I have copied the code from the “Anticipation Sample” to test it and AnticipatedNetworkTransform.Smooth() works correctly on client - smoothing the movement. However, when I try move the object on client and call the method to smooth the transform on the server side - the Sprite stays rendered and frozen in place. The position of the Transform also stays frozen while the rigidbody and collider moves with the AnticipateMove() - pushing other players while being “invisible”.
Enemy has a script “TestAttack” that moves the object. The issue is this part
[Rpc(SendTo.Server)]
private void ServerMoveRpc()
{
var currentPosition = netTrans.AnticipatedState;
// Calling Anticipate functions on the authority sets the authority value, too, so we can
// just reuse the same method here with no problem.
Move(true);
// Server can use Smoothing for interpolation purposes as well.
netTrans.Smooth(currentPosition, netTrans.AuthoritativeState, SmoothTime); // glitches on Host
}
However, it doest not matter when I invoke the method through RPC or directly from Host.
I am not sure if I have described it correctly as I have never encountered such issue. Here is the test project: Unity Test Project - Google Drive
Thank you in advance for help!!