Situation: After setting up depth of field params, changing pose and some scene props, I am returning toadjust depth of field params, but camera position and angle not the same as before and not comfortable to adjust params.
I am working on script which should move and rotate player camera to be aligned to atom (WindowCamera mostly). How to properly setup position and rotation for player params?
After some debugging, i figured out that default player camera rotation has this things:
SuperController.singleton.centerCameraTarget.transform - always have zero position and rotation. Changing position makes incorrect behavior, like when person should look at player, he looking with offset, and controller icons also rotating.
SuperController.singleton.navigationRig.transform - localPosition: x, z for moving, but seems with offset, y always 0. localRotation: x, z always 0, y for left/right camera rotation.
SuperController.singleton.MonitorCenterCamera.transform - localPosition always (0.0, 1.6, 0.0), localRotation: x for camera up/down rotation, y, z always 0.
SuperController.singleton.playerHeightAdjust - variable for y offset wneh camera rotating around focus point and Z/X buttons movement. Also this value changing by changing WorldScale.
I dont really know how this should work. I can just set global position but some things like height adjust will be incorrect, maybe some other plugins using this value and it can broke something.
Also i dont know how to modify focus point to rotate camera around it and zoom via mouse wheel. (SuperController.singleton.focusDistance)
I am working on script which should move and rotate player camera to be aligned to atom (WindowCamera mostly). How to properly setup position and rotation for player params?
After some debugging, i figured out that default player camera rotation has this things:
SuperController.singleton.centerCameraTarget.transform - always have zero position and rotation. Changing position makes incorrect behavior, like when person should look at player, he looking with offset, and controller icons also rotating.
SuperController.singleton.navigationRig.transform - localPosition: x, z for moving, but seems with offset, y always 0. localRotation: x, z always 0, y for left/right camera rotation.
SuperController.singleton.MonitorCenterCamera.transform - localPosition always (0.0, 1.6, 0.0), localRotation: x for camera up/down rotation, y, z always 0.
SuperController.singleton.playerHeightAdjust - variable for y offset wneh camera rotating around focus point and Z/X buttons movement. Also this value changing by changing WorldScale.
I dont really know how this should work. I can just set global position but some things like height adjust will be incorrect, maybe some other plugins using this value and it can broke something.
Last edited: