This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Basics
Rendering
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Classes and Components Overview

When you open your project based on the VR Sample for the first time and see a lot of different classes, you might get confused a bit. But let's take a quick look at each of them to see what they actually do and how they are connected.

VRInteractable Class#

This is a base class for all objects that you can interact with. It defines a basic set of interactions, in other words: here you define what can a user do with your object. You can add your own type of interaction here.

The following component classes are inherited from the VRInteractable:

ObjMovableThis component type can be used for all objects, that can be grabbed, held and thrown (it can be a ball, a pistol, whatever you can take, carry and drop).
ObjHandleThis component type can be used for all objects, that can be turned or moved while being held (various handles, levers, valves, etc.).
ObjSwitchThis component type can be used for all objects, that can be switched by grabbing (all sorts of buttons and on-off switches, including rotary ones).
ObjLaserPointerThis component enables casting a laser ray by the object.
Notice
The laser pointer object in the VR Sample world has ObjMovable and ObjLaserPointer components attached.

VRPlayer Class#

This is a base class for all players. It contains declaration of baseline controls, common basic player operations, callback management etc.

Notice
You can check out baseline controls for VR Controllers here.

The following component classes are inherited from the VRPlayer:

VRPlayerPCThis component implements a player with standard PC input devices (keyboard + mouse or Xbox360 controller) for VR emulation and contains all related settings and methods.
VRPlayerVR This is a base class implementing common functionality for supported VR devices and contains their common parameters. The UltraleapHandController class is inherited from VRPlayerVR and available when the Ultraleap plugin is loaded.

VRPlayerSpawner Class#

This class registers all VRPlayer components in the Component System. It checks that VR is initialized and spawns the VRPlayerVR.

Notice
In case if VR was not initialized, a VRPlayerPC is spawned.

MenuBaseGUI Class#

This is a base class for all graphic user interfaces (GUI).

The following component classes are inherited from the MenuBaseGUI:

Notice
These components can be attached to GUI objects only.
HandSampleMenuGui This component implements initialization of widgets for the menu that is attached to a controller.
WorldMenuSampleGui This component implements initialization of widgets for the world menu.
MixedRealityMenuGui This component implements initialization of widgets for the menu that is attached to an HMD.

Framework#

Framework includes the Component System which implements the core functionality of components and a set of utility classes and functions used for playing sounds, auxiliary math and 3d math functions, callback system implementation.

Triggers Class#

Triggers is a framework class used to mark room obstacles for the VR Player (e.g. room walls, objects, etc.) and give a warning if there is an obstacle on the way (as the player gets closer to an obstacle, controllers' vibration becomes more intense).

Notice
Obstacles are not available for VRPlayerPC.

You can simply create primitives for walls and objects in your room and add them as children to the node dummy named Obstacles, which is a child of the VR dummy node (see the hierarchy in the Editor below).

All children of the Obstacles node will be automatically switched to invisible mode and will be used only to inform the player and prevent collisions with objects in the real room.

Notice
Primitives used to mark obstacles must have their first surface (the one with the 0 index) named as "box", "sphere", "capsule" or "cylinder" in order to be properly converted into corresponding trigger volumes.
Last update: 2024-05-28
Build: ()