Skip to content

Conversation

@Mireille-T
Copy link
Contributor

Created a port of the simulation with controls that work on the PC. This will serve as:

  1. An option for users who may not have easy access to a compatible Oculus headset
  2. A new testing option for developers

This PC port was developed with the intention of ensuring that developers can do development work as usual and it will be automatically compatible with the PC port. More implementation and usage details as well as other notes (e.g. controls, warnings) can be found at the PC Port wiki page.

- Esc: Toggle pause
- Left click: Select (only for pause UI for now)
- Scroll: UI scroll
- Move mouse: Look around
- Right-click to grab
- R to push
- F to pull

Notes:
- Grabbable object will become the child of the camera instead of the hand (due to the lack of hand controllers)
- Crosshair added for easier visualization (substitute for laser)
- Repositioned pause menu to be more centralized
- Removed controller button highlights (not needed in PC port)
- WASD to move (forward, backward and sides only; no vertical movement)
- Adjusted position of subtitles
- Prevent script from halting early due to null reference exception to XR Controllers
- Ensure cursor is visible in pause menu
Disable the crosshair so it appears only in the Editor or on PC
Executable to run the PC port
- Removed UI settings not used in the PC port: "Live Controller Diagrams" and "Haptics"
- Imported PC port keyboard controls diagram into the Controls tab
Now Grab is bound to both C and Right-click. C was chosen for its position on the keyboard allowing for simultaneous pressing with other keys (e.g. WASD, RF), while avoiding bind conflicts in the Editor (e.g. Alt+F)
This will ensure that the subtitles will be deactivated while the pause menu is activated
Ensured that subtitles will show up during the menu section of the tutorial, and will not otherwise
- Comments added to `TutorialManager.cs` to explain changes
- `NarrationManager.cs` edited to give TutorialManager.cs access to the Subtitle object
Note: Text is localized, addressables built before testing (nothing from build addressables committed)
@Mireille-T Mireille-T requested a review from sonalij3 April 13, 2025 19:11
Using the custom scripting symbol IS_NOT_USING_OCULUS_LINK to determine whether the dev is using an Oculus link or not

Will be added to the wiki: To use the Oculus link, the dev will have to switch the build platform (if not already so) to Android, and remove IS_NOT_USING_OCULUS_LINK from the Player Settings
According to the [docs](https://docs.unity3d.com/ScriptReference/Camera-current.html) as well as [this forum](https://discussions.unity.com/t/when-is-current-camera-null/29574), seems like we should be using [Camera.main](https://docs.unity3d.com/6000.0/Documentation/ScriptReference/Camera-main.html) instead; reason why we haven't been doing so to my knowledge is because pausing checks for the "Player" tag to decide what _not_ to despawn, whereas Unity relies on the separate `MainCamera` tag to identify `Camera.main`

This switch to `Camera.main` will future-proof the PC port as a dev tool if/when we move to Unity 2022; as for the pause issue, we can just check for the `MainCamera` tag as well
To make sure that everything still works as normal in VR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants