med-material / Whack_A_Mole_VR

Whack-A-Mole in VR
MIT License
3 stars 15 forks source link

Upgrade Unity 2022.2.1 #244

Closed Xav1204 closed 1 year ago

Xav1204 commented 1 year ago

@bastianilso I've upgraded Unity to the latest version. In order to have a functional project, we need to do 2 changes in the project. The first thing to do is to add the script SteamVR_Camera_Helper to the camera. With this script, while the game is running, we will have a component Tracked Pose Driver that will be added to work with Open XR and move the camera in the vr environment. image The other thing to do is to disable CameraDisp2 in the CameraRig hierarchy : image Indeed, this camera comes into conflict with the main camera in the CameraRig object. When this camera is disabled, we can see that the instruction panel appears in the play mode. image I also tested in the build and it's still right. We have any problem with the executable.

bastianilso commented 1 year ago

@Xav1204 are you aware what function the CameraDisp2 camera object serves in the game? and what consequences it has to disable the camera?

Also, if you could please play the Mirror Therapy treatment program and attach a zip with the meta/event/sample CSV files here, I'll help with verifying everything is in order by running through the produced data.

EDIT: Also why does the calibration panel ("Velkommen") look vertically stretched in the bottom screenshot of Unity?

Xav1204 commented 1 year ago

@bastianilso I've made the zip with the datas of the Mirror therapy program. I activated the eye tracking during the session like that you will able to check if the eye tracking is right also. MirrorTherapy.zip

Tell me if it's right after the verification. Like that, I will push the changes on github and we could make the merge.

bastianilso commented 1 year ago

@Xav1204 I have checked the data and from the outset, it seems to look good. I tried testing it with aldryck's data visualization but i think there might be some bugs in his visualization. anyway, I'm waiting for him to get back to me, but I think you can start preparing the pull request with your changes. please document carefully what needs changing and why. Thanks!

Xav1204 commented 1 year ago

@bastianilso The first thing that I've made is to change the script on this background object : image Indeed, we had the component Enable During Calibration and the problem is that as this component wasn't disabled during the calibration, we have this kind of window that we had in the vr headset that causes the problem of rendering. image Now, we use the component Disable During Calibration, so like that, during the calibration, our white background is disabled and it will be available after the calibration. image Finally, as the CameraDisp2 and ScreenCastCamera are only used in the eye tracking system, I've disabled these cameras when we run the game and we enable, disable these cameras when we click on the button that manage the eye tracking system. image

bastianilso commented 1 year ago

@Xav1204 the GreyBackground object is supposed to be enabled only during calibration. This is why it carries the EnableDuringCalibration script. It's not clear to me what this has to do with the bug you were trying to fix, can you elaborate?

Xav1204 commented 1 year ago

@bastianilso When I removed the greybackground (whitemat) in the calibration panel, I obtained this result : image

bastianilso commented 1 year ago

@Xav1204 Okay.. What is going on...

bastianilso commented 1 year ago

@Xav1204 what we need to understand here:

Xav1204 commented 1 year ago

@bastianilso It's good, I've changed the OpenVr parameter Stereo Rendering Mode in multi pass as I explained you: image And I've also removed the WhiteMat background : image

Xav1204 commented 1 year ago

@bastianilso I forgot if I need to add again the white background that we had ? If it's not the case, we can merge this pull request.