Camera Rotation desyncs with NBT when moving
TheDiamondfinderNG opened this issue · 3 comments
Issue description
The cameras animation doesn't match up with the NBT data when it is rotating
Here's an image of a baby pig using a formula to sync up with the camera. It matches perfectly with static cameras and moving cameras before desync, but any lag spike can cause it
Steps to reproduce
- Place a moving camera
- Cause any lag spike (easiest way is via /reload but even regular client lag works)
Minecraft version
1.20.1
Forge/NeoForge version
47.4.6
SecurityCraft version
v1.10
Other relevant versions
No response
If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)
No response
This behaviour, albeit unintuitive, should only have purely cosmetic side effects for survival gameplay. The clientside camera rotation is not used anywhere outside the camera model rendering (which itself only affects the camera's visuals) and Frame feed rendering, and whenever a client loads up a Frame feed of a camera, the camera's clientside rotation is synched up with the server's NBT rotation again.
Implementing this synchronisation to happen more often is probably a strain for performance/network, so unless there's a gameplay benefit from this being fixed (in which case feel free to tell!), I'd rather not change this behaviour.
Mine is a little bit of a niche case, I'm making a heist datapack/modpack and I need the camera's visual to match up with the camera's NBT. The NBT (using some radians-degrees conversion) is matched up with a baby pig so it can detect the player through its eyes
But because the camera is the main visual indicator for where it's looking unless I make the pig visible
If you don't want to work on it specifically for that, I completely understand
Fixed by commit a355a0e.