Update 0.99.50: Bug Fixes, VR, CM GDC, checklist logic

This patch contains a lot of bug fixes where I have tried to address some of the known blocking issues. It will also roll out an improvement to the Checklist Guidance System (aka "RUN") that helps you execute checklists and plan for maneuvers. In addition I have taken a big leap in improving the Virtual Reality implementation. I have also spent some time improving the Command Module panels and underlying logic (not graphical only), and added some cue cards and PADs that can be visible inside the cockpit.
Note: A lot of core features has been changed in this patch. If this update gives you issues, you can revert to a previous build using the Steam Betas tab. The previous update is on branch: Reentry Version Reentry Version 0.99.45.
Critical bug fixes
- Fixed an issue with the Lunar Module P52 opt 2 logic that would crash the game
- Fixes to the Apollo Ground Crew (cold & dark state) that led to Fuel Cell issues
- Command Module Battery Charger fixes and reverse current fixes
- Fixes to the Command Module EPS logic and Fuel Cell wiring.
- Fixes to the Command Module Accelerometer Indicator
- P52 opt 3, removed one excessive PRO press compared to checklist
- Command Module roll index fixes
- Improved the Apollo Saturn V pre-launch checklist with time stamps
- Fixes and updates to the Academy lessons
- Fixes for the UI and Mission Translation tools
- Mission achievement unlock fixes
- Lot's of typos
Checklist Guidance System
The checklist guidance system has received an improvement and some UI changes. The RUN button has now been split into two different buttons. Both of them will RUN the checklist and move all its instructions into the Checklist Guidance System (CGS). Their difference is how they queue/add the steps of the checklist to the CGS.

You can queue up instructions from multiple checklists. To do this, you can open a checklist and press one of the RUN buttons. All instructions are then copied into the Checklist Guidance System. If you go back and select another checklist, and press one of the RUN buttons, all the steps from that checklist will also be queued up, or appended, to the existing steps. By using this feature you can stack up multiple checklists and follow them through the Checklist Guidance System.
The difference between the two RUN buttons is that one of them will add all the checklist steps in-front of the queue (so above the current step), while the other will append all the steps at the bottom of the existing queue.
Some checklists has dependencies, requirements, and asks you to also complete another checklist in-between its steps. Using this new system you can insert the steps from one of those steps in the middle of an already executing checklist without the need of pressing CLEAR ALL, complete the other reference checklist, before having to continue the checklist you were actually completing.

During the Academy or the Campaign, you will mostly execute a single checklist at a time, and can in that case use any of the two buttons.
Improved Panel Interaction ray-casting logic
This was a brutal issue to fix but I have finally managed to improved and fix issues related to the switch interaction logic. Using the mouse buttons you can flip a switch or press a button by using the left and right mouse buttons. When pressing a button using the mouse or VR, a ray will be cast from your mouse cursor to the switch you wish to interact with. This ray-casting logic has now been improved to better be able to detect what you want to press and should be more predictable.

Resizable Checklist Guidance UI
The checklist guidance UI window can now be resized. Press and hold the mouse cursor on one of the corners of the window or one of the edges, and drag to resize it. This is good if you are curious about other steps, want to make the window larger, or smaller. Keep in mind that you can still move it anywhere on your UI by clicking and dragging the window within its edges.

Virtual Reality

VR - Command Module Optics: I have added support for using the Command Module Optics/Scopes for both controller mode or the VR Mouse Cursor mode. You can bind keys for switching between scopes and exiting from it. This applies to normal desktop play and both VR modes.
VR - Improved core UI logic for VR: I have had issues scrolling the mission pads, maps, checklists, pressing buttons etc. in VR. I have improved how the VR modes now interact with the UI, allowing better control and predictability while handling the various UIs and scroll views.
VR - Mission Pad and UI elements now block panels behind it: Previously the VR UI system was unable to detect if a UI element was pressed, and if you would interact with the UI (like pressing a button) and a panel switch was also behind that button, you would both trigger the button-press logic, and flip the switch behind it. This has now been fixed.
VR - Scroll wheel support: You should now be able to scroll UI elements with the mouse scroll wheel while using the VR Mouse Cursor mode.
// End of VR ///
Improved Attitude Set Control Panel and Logic
The logic behind the Attitude Set Control Panel has been fixed and I have improved the panel to better reflect reality. You can click and hold the Roll, Pitch, Yaw thumbwheels to change the target angle. Pressing once will increase/decrease the angle by 0.2 degrees. Holding down the button press will roll it continuously and the pace of the roll will increase the longer you hold down the interact key.

Command Module: GDC and GDC Align
I have rewritten the entire Gyro Display Coupler (GDC) logic in the Apollo Command Module. This is a set of gyros responsible to maintain an inertial platform and is used as a "backup" to the Inertial Measurement Units (IMU). This improvement will now also allow you to better align the GDC towards a desired attitude, or align it with the IMUs (common Apollo Command Module procedure).

Using this new system will allow you to use the Attitude Set Control Panel (ASCP) to set a target attitude, and then use GDC ALIGN to slew the GDC so the attitude of the space craft becomes similar to what the Attitude Set Control Panel thumb wheels indicate. This is great if you wish to for example slew the GDC during Transposition & Docking to make the 180 pitch maneuver more precise.

You can also use this to better align the GDC with the IMU (the previous simplification is still recommended as the auto slew function still can run into issues) by following this checklist:

Manual GDC slew: If the GDC ALIGN logic is unable to automatically drive the gyros to the desired orientation you can at any time while holding down the GDC ALIGN button switch to Manual Gyro Slew Mode by pressing any of the Gyro Slew hot keys. To do this, you need to bind the Gyro Slew Pitch/Roll/Yaw hot keys in the input mapper. While the GDC Align button is held down and one of these keys are pressed, it will switch from automatic drive to manual slew. You can then slew the ball to any orientation (without worrying about gimbal lock).

In the video below you can see me use the Attitude Set Control Panel to align the Gyros during transposition & docking. I use the GDC ALIGN to auto-drive the GDC to the target attitude, use this to simplify the turnaround maneuver. Once docked, I align the GDC to the IMUs again showing the GDC ALIGN method, the manual slew GDC align method and the GDC Aling to IMU simplification procedure I have coded into the game. The IMU simplification will automatically align the GDC perfectly with the IMU. Everything related to these three modes are explained in the ALIGN GDC TO IMU checklist.
[previewyoutube][/previewyoutube]
In-Cockpit PADs
You can use the CREW MEMBERs -> COCKPIT EQUIPMENT to toggle an in-cockpit version of any PAD that you have drawn. The PAD will be attached to some Velcro on the panels and can be easily referenced while operating the computer and plotting data. A micro-UI can be used to navigate between the PADs.

Note: Keep in mind that if you have not filled out a PAD, the sheet will be empty. The in-game PAD system is a backup system for those who do now have the PADs printed out or available through a tablet.
Apollo Cue Cards
I have added multiple in-cockpit cue cards (data from the Apollo 15 checklists) that can be toggled to be able to reference procedures and important steps/information during various procedures.


General interior fixes and recoloring
I have updated some rendering shaders, materials and re-made some models to improve the visual quality of the Command Module/Mercury/Gemini interiors to make it more realistic.

Thank you for reporting issues!
0.99.50 bug fixes and patch notes:
- Lot's of typos
- Fixed an issue with the Lunar Module P52 opt 2 logic that would crash the game
- Improved the Apollo Saturn V pre-launch checklist with time stamps
- Fixes to the Apollo Ground Crew (cold & dark state)
- Fixes to the Command Module EPS logic and Fuel Cell wiring.
- Command Module Battery Charger fixes
- Fixes to the Command Module Accelerometer Indicator
- P52 opt 3, removed one excessive PRO press compared to checklist
- Command Module roll index fixes
- Fixes and updates to the Academy lessons
- Fixes for the UI and Mission Translation tools
- Mission achievement unlock fixes
- Improved ray-casting logic in all modules, used to cause sometimes when working with the OBC or the CMC/LGC.
- Fixes to the Apollo Command Module GDC platform logic
- CSM Pyro Logic fixes
- Minor updates to the Command Module cockpit
- Rearranged the Checklist UI slightly
- Added a new RUN-button that will put the checklist in front of the instructions queue
- Made the checklist guidance UI resizable
- Apollo: Cue Cards
- Command Module: Window Shades for all 5 windows to block against sunlight
- Added keyboard mappings to switch between optics and exit them
- VR: Added support for the CSM Optics using VR Mouse Cursor mode
- VR: Fixed VR interaction with UI and Mission Pad, it kept loosing focus while dragging the scroll views or map views
- VR: Fixed so you do not interact with the panels when interacting with VR UI
- VR: Added support to scroll game UI with the scroll wheel while using the VR Mouse Cursor mode
- VR: Made it possible to move the Mission Pad and VR Tools by adding a button that will attach it to the VR HMD Rig, and release it.