Gistix / portal2vr

Portal 2 VR Mod
752 stars 19 forks source link

Overhaul config parsing, custom viewmodel offsets #23

Closed vittorioromeo closed 11 months ago

vittorioromeo commented 11 months ago

First of all, thanks for working on this project! It's really nice to see Portal 2 from a different perspective. Can't wait until proper 6DOF and roomscale features are implemented. Feel free to look at or steal my implementation in QuakeVR: where the magic happens and a general search for "roomscale".

This PR introduces two changes:

  1. It overhauls the config parsing logic -- now every field can be optional, and comes with an hardcoded default that is loaded if the field is missing or if a parsing failure occurs. Error messages have also been improved.

  2. Adds two new config entries: ViewmodelPosCustomOffset[XYZ] and ViewmodelAngCustomOffset[XYZ]. These are custom offsets applied on top of the hardcoded ones, allowing players to tweak the position and orientation of the viewmodel. With my Quest Pro controllers, for example, a value of ViewmodelPosCustomOffsetX=5 is desirable.

Gistix commented 11 months ago

Thank you for your contribution!

iburakov commented 11 months ago

Here are the values I've settled on with Quest 2 controllers:

ViewmodelPosCustomOffsetX=7.0
ViewmodelPosCustomOffsetY=0.0
ViewmodelPosCustomOffsetZ=1.5

Maybe it'll save someone a minute.

Thanks for this experience!