Page MenuHomeFeedback Tracker

LinkToLocalSpaceOf and UnlinkFromLocalSpace cause screen blink/screen switching and short freeze player on clients
Closed, ResolvedPublic

Description

LinkToLocalSpaceOf and UnlinkFromLocalSpace cause screen blink/screenswitching and short freeze player on client

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
General
Steps To Reproduce

Use LinkToLocalSpaceOf and UnlinkFromLocalSpace on server side

Vedeo:
https://www.youtube.com/watch?v=S6tAgkM5LoU

Event Timeline

borizz.k created this task.May 14 2020, 7:38 PM
komer added a subscriber: komer.May 15 2020, 3:46 PM
Geez changed the task status from New to Assigned.May 15 2020, 4:46 PM
Lex added a subscriber: Lex.May 16 2020, 2:33 AM

Its fine someone use and read source code of my RoadTrip mod :P

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

borizz.k added a comment.EditedMay 27 2020, 7:44 PM

Its fine someone use and read source code of my RoadTrip mod :P

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

borizz.k added a comment.EditedMay 27 2020, 7:47 PM

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

What matrixes and network delays?

borizz.k added a comment.EditedJun 20 2020, 11:47 AM

LinkToLocalSpaceOf not correctly works in 1.08 exp
Player going to sea anyway ((

komer added a comment.Jun 20 2020, 4:58 PM

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.

borizz.k added a comment.EditedJun 23 2020, 12:04 PM

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 );
Geez closed this task as Resolved.Jun 23 2020, 2:07 PM
Geez claimed this task.

Personal thanks to Jacob Mango
Thanx all