Fig.2 Interactive function of VR scene
360vision indicates that user can observe surrounding environment freely with control input via headsets. A real observe experience which has no limit from orientation can be established compared with traditional applications where vision is limited to camera.
User displacement indicates that user may change position in VR scene freely via joystick either in speed mode or destination mode. In speed mode, position coordinates change at a constant rate once the direction is determined, while in destination mode, coordinates of destination is selected via world pointer where Bézier curve is applied, and coordinate of current position is replaced by destination coordinate.
Object interaction supports interaction with object via joystick in forms of touch, grab and use. Once touched on an object in VR scene, reaction will be presented (i.e. effect of deformation) and feedback will be generated in forms of vibration on joystick which stimulates human sense of touch so as to simulate touching on an object in real world. Grab is established via creating a fixed joint associated with joystick and synchronize movement with joystick. Function of using an object is triggered by joystick input such as pressing a button, and the object may change in behavior which is determined by definition on object (i.e. light turning on or off).
Menu interaction indicates that a 2D menu can be called out upon input from joystick which enables interaction via world pointer laser beam. A 2D virtual keyboard is introduced in this VR project, users can ‘press’ a key by controlling the world pointer for typing text into text frame.
Considering the need of interaction, two joysticks is applied in this VR application which is handled by left hand and right hand respectively. Left joystick is responsible for user displacement, while right joystick is responsible for man-machine interaction including object interaction and menu interaction.
2.3 Establishment of a VR scene
The VR interactive scene in this paper is realized by HTC Vive with Unity 3D engine, SteamVR Plugin and VRTK, where C# programming language is applied to scripts. Models of objects are obtained mainly via Unity Asset Store. Major steps of building up a VR scene can be listed as follows: