- Each functionality has it's own MonoBehaviour component following the Composition Programming Pattern.
- Inter-Script communication is done via public Inspector references for maximum code optimisation.
- Scene Hierarchy is clean (without unnecesary, unused objects) and objects are named properly.
- Maximum things are done via scripts and thus very limited editor/inspector dependency.
Thus, the above ensures butter-smooth, error-free scalibility and maintainability.
- Hand and Controller tracked Control UI (this keeps UI accessable even when camera view changes)
- Modern aesthetic UI
- UI tooltips for each mechanism in the scene
- Use of joints to limit movement for switches and levers
- UI Audio feedback
- Challenge: Unable to use
Update()
to track rotation due to performance concerns. - Solution: Used triggers to detect when the lever or switch reached the desired position.
- Challenge: Rigidbody with hinge handles was not working correctly.
- Initial Consideration: Using on/off colliders as trigger detectors, but this introduced redundancy and dispersed logic.
- Final Solution: Created a child GameObject of the handle with a Rigidbody, allowing a singular and cleaner implementation.
- Challenge: The user can move around in VR, which affects switching between different camera views.
- Solution: Assuming a seated experience, locomotion is turned off, and camera switching is toggled via button press.
- Challenge: Playing animation by name is not scalable, as animation names can change.
- Solution: Assigned the animation clip in the inspector and used
.name
to play it dynamically from the Animator.
- Reasoning: While the project currently has a limited number of audio clips, ensuring scalability from the start is a best practice.
- Implementation: Converted
AudioManager
into a Singleton to manage audio playback efficiently.
- Issue: TrackedPoseDriver on the camera was preventing manual setting of rotation to Third-Person View (TPV).
- Todo: Need further testing to find a way out.
- Problem: UI elements were not always visible when the user changed their view.
- Solution: Implemented a control-tracked control UI that remains in view regardless of camera view changes.