Items in Bag Rotate Towards Player Differently Per Eye
hammy275 opened this issue ยท 6 comments
Reported in this message. Title is pretty self-descriptive, though.
Also https://discord.com/channels/1061675558347489343/1196476182443589722/1196476182443589722
Also also https://discord.com/channels/1061675558347489343/1238278245435052062/1238278245435052062
I'm guessing this issue occurs from using the render camera to determine how to rotate the items, which obviously changes for each eye. Instead, we should be doing it based on the position of the HMD when in VR, and the render camera still when not in VR.
EDIT: Considering this doesn't always happen, this may not be the case. Seems more difficult to figure out than I first thought.
Should be the fault of https://github.com/hammy275/immersive-mc/blob/1.19.x/common/src/main/java/com/hammy275/immersivemc/client/immersive/AbstractImmersive.java#L326 . Need to see if this is the same Vivecraft bug that popped up for this a while ago or if it's on me for calling it when I do.
EDIT: Not sure what I was thinking here; doesn't seem to be it
Another report of this (https://discord.com/channels/1061675558347489343/1069662191726370827/1278407282442506272) reports removing the EntityCulling mod fixes the issue. Their full mod list is
.
Considering that the rotation rendering is based on the last rendered entity on Vivecraft's end, it makes sense this would mess things up. I should look to see if I can replace the Minecraft.getInstance().getEntityRenderDispatcher().cameraOrientation()
calls with something directly based on the eyes; probably look at what Vivecraft already replaces it with and just use that. Would probably require adding that to MC VR API and the VR API PR.
EDIT: It looks like Vivecraft just gets .camera.rotation()
instead when there's no entity being focused, which would make sense in our case to do. This isn't something that needs to be exposed in either VR API, in my opinion, so I won't be doing that.
As a whole, we also run into the issue of rotating your head making the items point opposite of your head direction, rather than look towards you.
Fixing this should also fix the above issue, since there's only one head position.
1.20.4 version is 67391a6. Need to downport this, but otherwise done.