3. Technical Documentation - frk2689/UXDM-AVRP-VRgardening GitHub Wiki

Scripts

Watering

PourDetector: This script calculates the angle of the watering can and triggers the creation of the water stream at the angle of 45° and stops it as soon as the watering can straightens again. It also starts the water sound to enhance the experience.

WaterStream: This script creates the water stream.

Planting Pot

Box A: This script recognizes the color of the seed and triggers the appropriate growing animation as soon as the watering can collider collides with the collider of the pot.

Portal

Portal: This script teleports the user to the opposite side of the river as soon as the player collides with the portal.

Oculus Integration Kit

A collection of core VR features to ease the development process in Unity. We used the following prefabs (reusable game objects) in our project:

  • OVRPlayerController: Basic interaction and movement of the player. Allows the player to move around in the virtual environment. It includes components that are necessary for 3D control, such as the OVRCameraRig prefab - A custom VR camera that optimizes rendering for a stereoscopic display on the Oculus device.
  • OVRHandPrefab as part of the OVRPlayerController: Implements hands as input affordance.
  • OVRGrabber script: Allows grabbing and throwing of objects by using Oculus Touch controllers.
  • OVR Grabbable script: Attaches to objects to allow them to be grabbed and thrown with the Oculus controllers.

Sequence Diagrams

sequenceDiagram1

sequenceDiagram2