Snow1226 / CameraPlus

Plugin for Beat Saber for a smoother and wider FOV camera
MIT License
122 stars 21 forks source link

External Linkage sends shifted pos/rot when 'Room' configuration edited in base game. #26

Closed kan8pachi closed 1 year ago

kan8pachi commented 1 year ago

The camera position and rotation sent from External Linkage (VMC Protocol) does not seem to be as intended when Room configuration is edited in game setting. ゲーム内の Room 設定が変更されていると、External Linkage (VMC Protocol) から送られるカメラの位置と向きがその分ずれるようです。

How to reproduce:

Snow1226 commented 1 year ago

ありがとうございます、確かにExternalSender時にRoomAdjustを考慮していません。 1.31においてはNoodleも更新された影響で変更を入れるため、PR#27については検討させてください。

Thanks, certainly not considering RoomAdjust when ExternalSender. In 1.31, Noodle will also be updated and changes will be made, so please consider PR#27.

kan8pachi commented 1 year ago

Thank you so much. PR #27 is just for sharing the workaround that is working at maigo-san's environment regarding RoomAdjust only, so no problem. Please just close it when you no longer need it. Since our use case doesn't currently depend on Noodle so much and the workaround above is almost good for us, please take your time fixing it including Noodle!

Snow1226 commented 1 year ago

I tried reconfirming the code and behavior, but since the changes in the Room settings are absorbed elsewhere, For VMCProtocol, there should be no problem in sending ThirdPersonPos and ThirdPersonRot as they are. I checked in 3 environments, but I can't confirm Maigo's symptoms.

Snow1226 commented 1 year ago

Additional information may be required for verification.

Snow1226 commented 1 year ago

CameraPlus is now CameraPlusBehaviour +Camera Plus Origin  ++ inGame Camera It has a hierarchy structure of , and the inGame Camera Local value is sent to the VMC. RoomAdjust is a structure that doesn't need to consider the rotation of in-game objects, but since only Noodle's PlayerTrack is affected, only GameScene handles RoomAdjust in Origin. Therefore, LocalPosition and LocalRotation of inGame Camera are not affected by RoomAdjust at all. And it sends Position and Euler as it looks to VMC.

Development environment (1.31.0) My delivery environment (1.29.1) I built (1.29.1) on a new PC and entered Maigo's Room settings and more extreme values, but I couldn't confirm the reproduction.

Snow1226 commented 1 year ago

I'm sorry, I was able to reproduce the situation. There is no problem with the code you provided, so I will merge it. Thank you for the issue.