LinkToLocalSpaceOf and UnlinkFromLocalSpace cause screen blink/screenswitching and short freeze player on client
Description
Details
- Severity
- None
- Resolution
- Open
- Reproducibility
- N/A
- Operating System
- Windows 10 x64
- Category
- General
Use LinkToLocalSpaceOf and UnlinkFromLocalSpace on server side
Event Timeline
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 don't know RoadTrip mod
Earlier, I used the AddChild function to bind players to cars (and for another objects), but decided to test this function
I use LinkToLocalSpaceOf for bots, I don’t notice teleportation to the sea, maybe you have zero values in the matrix or something else.
I use for player on server side (like in 1.07)
vector matPlayer[4]; vector matTarget[4]; vector matLocal[4]; 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.
Oh and @Geez, this ticket can be closed. Works as expected for the Expansion Mod in both 107 and 108.
In 1.07, this worked fine only on server
See code:
vector mat[4]; GetTransform(mat); mat[3] = m_LinkingEntity.CoordToLocal( GetPosition() ); LinkToLocalSpaceOf( m_LinkingEntity, mat );