Rotation of SpectatorCam different on client & server

Tutorials and discussions about Mapping - Introduce your own ones!
User avatar
Barbie
Godlike
Posts: 3040
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Rotation of SpectatorCam different on client & server

Post by Barbie »

Has anyone an idea why the SpectatorCam is oriented correct on local play but seems rotated 180° in yaw direction on network play? Demo map attached.

Code: Select all

Begin Actor Class=SpectatorCamFix Name=SpectatorCamFix0
     FadeOutTime=8.000000
     Level=LevelInfo'MyLevel.LevelInfo0'
     Tag="ExtroCamera"
     Region=(Zone=ZoneInfo'MyLevel.ZoneInfo1',iLeaf=6,ZoneNumber=2)
     Location=(X=-20065.476562,Y=19867.027344,Z=2211.086670)
     Rotation=(Pitch=-1392,Yaw=-24520)
     OldLocation=(X=-8736.000000,Y=-768.000000,Z=1248.000000)
     bSelected=True
     DrawType=DT_Sprite
     Name="SpectatorCamFix0"
End Actor
You do not have the required permissions to view the files attached to this post.
"If Origin not in center it be not in center." --Buggie
Buggie
Godlike
Posts: 3275
Joined: Sat Mar 21, 2020 5:32 am

Re: Rotation of SpectatorCam different on client & server

Post by Buggie »

DrawType=DT_Sprite
Then rotation not replicated and used default value.
Need use DT_Mesh.
Replicaion rule:

Code: Select all

	unreliable if( !bCarriedItem && (DrawType==DT_Mesh || DrawType==DT_Brush) && (bNetInitial || bSimulatedPawn || RemoteRole<ROLE_SimulatedProxy) && Role==ROLE_Authority )
		Rotation;
   
Auto merged new post submitted 1 minute later
Or use bNoDelete. In such case locally actor keep same, and if rotation on server not change - it will match to server. No replication, but start values is same.
User avatar
Barbie
Godlike
Posts: 3040
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Rotation of SpectatorCam different on client & server

Post by Barbie »

Buggie wrote: Wed Feb 19, 2025 2:44 am DrawType=DT_Sprite
Then rotation not replicated and used default value.
I opened the original map and thought "Wth! The SpectatorCam is not visible in Editor? Then fix it and change DrawType to (assumed correct) DT_Sprite." :loool:

Thanks for hint.
Another thing that should be fixed in UT updates… Maybe add a nice Mesh for it.
"If Origin not in center it be not in center." --Buggie
Buggie
Godlike
Posts: 3275
Joined: Sat Mar 21, 2020 5:32 am

Re: Rotation of SpectatorCam different on client & server

Post by Buggie »

We can't change default mesh by compatibility reasons.
I usually put here IPanel mesh. And MapChecker warn about that as well. Both mistakes - sprite and missed mesh.