I am using a SyncPosition script instead of the NetworkTransform component as with the component sync is not working correctly. When i use the SyncPosition script the following happening:
From the Server/Client side sync. is working perfectly
On the Client side the object is hard to move. Ii is like a rubber band the object is moved only a short distance and behave like there is a rubber band connected.
Again, when using the NetworkTransform component all work perfectly.
You only want to transmit the position data for a local player. So you need to add an if (isLocalPlayer) check in your TransmitPosition function. Without the check, you transmit data for other clients objects as well (without having authority of course).
BTW, with your current implementation you transmit the data on each Update() tick. Depending on the frame rate, this might be transmission at a higher interval than you actually want/need (also considering network bandwidth consumption).
Thanks. I am currently travel and will test this on Wednesday. I am aware that I consume a lot of bandwidth but will fix that when this works accordingly.
Tested and it did not work. With this update i get the same situation on both sides, this changed the host side.
I think, what seems to happening is that when i draw the object and release it it returns back to the same position. The rubber band effect i see is because the Lerp i guess.
Tested and it did not work. With this update i get the same situation on both sides, this changed the host side.
I think, what seems to happening is that when i draw the object and release it it returns back to the same position. The rubber band effect i see is because the Lerp i guess.