LinkToLocalSpaceOf and UnlinkFromLocalSpace cause screen blink/screenswitching and short freeze player on client
- Operating System
- Windows 10 x64
Use LinkToLocalSpaceOf and UnlinkFromLocalSpace on server side
Can confirm, except for an issue with getting out of seats and sometimes players teleport to 0,0 (mod issue) it works fine.
No flickering, no delay, no short freeze.
For it to work best you have to do a bunch of matrix math and add network delays when you call them so you don't call them at the same time
I use for player on server side (like in 1.07)
vector matPlayer; vector matTarget; vector matLocal; player.GetTransformWS(matPlayer); m_CarEntity.GetTransform(matTarget); Math3D.MatrixInvMultiply4(matTarget, matPlayer, matLocal); player.SetTransform(matLocal); LinkToLocalSpaceOf(m_CarEntity, matLocal); m_CarEntity.Update();
matrixes not zeroed, position on server is correct
but player on client always at the sea, but if unlink, player back to pervious position
may be i must use LinkToLocalSpaceOf on client too? why?
in 1.07 not need it
Again broken a useful feature (((
Perform on the client first within the command handler for the player you are linking and then perform on the server. Notice how StartCommand_Vehicle is always called on the client before it is called on the server, this is why. It is only called on the client which is being linked and the server, you do not need to sync to any other vehicle.
Not sure how you managed to have the function work when only being called on the server in 107.