This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
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
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Система ввода VR

The VR input system allows managing user input from VR controllers, head-mounted displays (HMDs), base stations, and trackers. It supports a wide range of VR devices, enabling you to utilize several devices from various vendors and process input from them.Система ввода виртуальной реальности позволяет управлять пользовательским вводом с контроллеров виртуальной реальности, дисплеев, устанавливаемых на шлемах (HMDS), базовых станций и трекеров. Он поддерживает широкий спектр устройств виртуальной реальности, позволяя вам использовать несколько устройств от различных производителей и обрабатывать вводимые с них данные.

The InputVRDevice class provides access to properties and settings common for all VR devices (for example, a device name).Класс InputVRDevice предоставляет доступ к свойствам и настройкам, общим для всех устройств виртуальной реальности (например, к имени устройства).

Внимание
VR plugins (OpenVR, Varjo, Oculus) that implement similar functionality are considered deprecated and will be removed in the next SDK release. Плагины виртуальной реальности (OpenVR, Varjo, Oculus), реализующие подобную функциональность, считаются устаревшими и будут удалены в следующем выпуске SDK.

VR Controllers
Контроллеры виртуальной реальности
#

Controllers serve as a primary interface for VR input. There are three types of VR controllers: left-hand, right-hand controllers, and a treadmill. You can get the controller's type and check whether it is a hand controller by using the corresponding methods of the InputVRController class.Контроллеры служат основным интерфейсом для ввода данных виртуальной реальности. Существует три типа контроллеров виртуальной реальности: левосторонние, правосторонние и беговая дорожка. Вы можете получить тип контроллера и проверить, является ли он ручным контроллером, используя соответствующие методы класса InputVRController.

The VR input system supports a range of controller models compatible with OpenVR, Varjo, and Oculus devices. In this article, we will consider the following models of controllers as examples:Система ввода VR поддерживает ряд моделей контроллеров, совместимых с устройствами OpenVR, Varjo и Oculus. В этой статье мы рассмотрим следующие модели контроллеров в качестве примеров:

  • HTC Vive (compatible with OpenVR and Varjo devices)HTC Vive (совместим с устройствами OpenVR и Varjo)
  • Oculus Touch (compatible only with Oculus HMDs and works via OpenVR)Oculus Touch (совместим только с Oculus HMDS и работает через OpenVR)
  • Valve Knuckles (compatible with OpenVR and Varjo devices)Valve Knuckles (совместим с устройствами OpenVR и Varjo)

UNIGINE API provides access to the VR controller inputs — axes and buttons.UNIGINE API обеспечивает доступ к пользовательскому вводу с VR-контроллеров — осям (axes) и кнопкам (buttons).

  • Buttons are mapped to the controller's buttons that can be pressed, touched, or released. Кнопки сопоставляются с кнопками контроллера, которые можно нажимать, касаться или отпускать.
  • Axes detect 1-dimensional movement of the control and have more complex behavior.

    Depending on the type of the VR controller, the number of axes differs. UNIGINE supports up to 4 axes. But usually, a controller has 3.Depending on the type of the VR controller, the number of axes differs. UNIGINE supports up to 4 axes. But usually, a controller has 3.

    In UNIGINE, an axis can be mapped to a control of one of the following types (also referred to as an axis type): trackpad, joystick, or trigger. Each axis type has a different number of reserved axes. For example, combining two axes of a joystick or trackpad allows tracking of 2-dimensional movement along the X and Y axes.In UNIGINE, an axis can be mapped to a control of one of the following types (also referred to as an axis type): trackpad, joystick, or trigger. Each axis type has a different number of reserved axes. For example, combining two axes of a joystick or trackpad allows tracking of 2-dimensional movement along the X and Y axes.

    Примечание
    You cannot know in advance which type of controller is connected, so UNIGINE API allows you to identify the number of supported axes and check their types.You cannot know in advance which type of controller is connected, so UNIGINE API allows you to identify the number of supported axes and check their types.
    Depending on the type of the VR controller, the number of axes differs. UNIGINE supports up to 4 axes. But usually, a controller has 3.In UNIGINE, an axis can be mapped to a control of one of the following types (also referred to as an axis type): trackpad, joystick, or trigger. Each axis type has a different number of reserved axes. For example, combining two axes of a joystick or trackpad allows tracking of 2-dimensional movement along the X and Y axes.You cannot know in advance which type of controller is connected, so UNIGINE API allows you to identify the number of supported axes and check their types.
    Оси определяют движение органа управления в одном измерении и имеют долее сложное поведение.

    Depending on the type of the VR controller, the number of axes differs. UNIGINE supports up to 4 axes. But usually, a controller has 3.В зависимости от типа контроллера виртуальной реальности количество осей различается. UNIGINE поддерживает до 4 осей. Но обычно контроллер имеет 3.

    In UNIGINE, an axis can be mapped to a control of one of the following types (also referred to as an axis type): trackpad, joystick, or trigger. Each axis type has a different number of reserved axes. For example, combining two axes of a joystick or trackpad allows tracking of 2-dimensional movement along the X and Y axes.В UNIGINE ось может быть сопоставлена элементу управления одного из следующих типов (также называемого типом оси): trackpad,joystickилиtrigger. Каждый тип оси имеет разное количество зарезервированных осей. Пример, объединение двух осей джойстика или трекпада позволяет отследить двойное перемещение по осям X и Y.

    Примечание
    You cannot know in advance which type of controller is connected, so UNIGINE API allows you to identify the number of supported axes and check their types.Вы не можете заранее знать, какой тип контроллера подключен, поэтому UNIGINE API позволяет вам определить количество поддерживаемых осей и проверить их типы.

OpenVR Controllers
Контроллеры OpenVR
#

This chapter showcases examples of inputs on different types of OpenVR-supported controllers — HTC Vive, Oculus Touch, and Valve Knuckles controllers — and provides information on how these inputs are mapped to the buttons and axes within the UNIGINE input system.В этой главе представлены примеры входных данных на различных типах контроллеров, поддерживаемых OpenVR - контроллерах HTC Vive, Oculus Touch и Valve Knuckles - и представлена информация о том, как эти входные данные сопоставляются с кнопками и осями в системе ввода UNIGINE.

Примечание
You can find the list of common OpenVR controller types here.Вы можете найти список распространенных типов контроллеров OpenVR здесь.

HTC Vive Controller Inputs
Входы контроллера HTC Vive
#

Примечание
This type of controller is supported by Varjo devices as well.Этот тип контроллера также поддерживается устройствами Varjo.

HTC Vive Controller Axes and Buttons (image sourced from vive.com, courtesy of vive.com)Оси и кнопки контроллера HTC Vive (изображение взято с сайта vive.com, любезно предоставлено vive.com)
Button/
Axis
Description Interaction Type UNIGINE Button/
Axis
UNIGINE Axis Number Axis Range
1 Menu Button Press
  • Left hand: VR_BUTTON_X
  • Right hand: VR_BUTTON_A
2 Trackpad Press / Touch
  • Left hand: VR_BUTTON_AXIS_0_LEFT
  • Right hand: VR_BUTTON_AXIS_0_RIGHT
2 Trackpad Horizontal / Vertical Movement
  • 0 for the X axis
  • 1 for the Y axis
[-1;1]
  • When moving along the X axis: -1 for right-to-left movement, 1 for left-to-right movement
  • When moving along the Y axis: -1 for forward movement, 1 for backward movement
3 System button Press
  • Left hand: VR_BUTTON_SYSTEM_LEFT
  • Right hand: VR_BUTTON_SYSTEM_RIGHT
7 Trigger Press / Touch
  • Left hand: VR_BUTTON_AXIS_1_LEFT
  • Right hand: VR_BUTTON_AXIS_1_RIGHT
7 Trigger Squeeze 2 for the Trigger axis [0;1]
8 Grip button Press
  • Left hand: VR_BUTTON_GRIP_LEFT
  • Right hand: VR_BUTTON_GRIP_RIGHT

Oculus Touch Controller Inputs
Входы сенсорного контроллера Oculus
#

Примечание
This type of controller works via OpenVR and is compatible with Oculus HMDs only.Этот тип контроллера работает через OpenVR и совместим только с Oculus HMDs.

Oculus Touch Controller Axes and Buttons (image courtesy of developer.oculus.com)Оси и кнопки сенсорного контроллера Oculus (изображение любезно предоставлено developer.oculus.com)
Button/
Axis
Interaction Type UNIGINE Button/
Axis
UNIGINE Axis Number Axis Range
  • Button.One
  • Button.Three
Press
  • Left hand: VR_BUTTON_X
  • Right hand: VR_BUTTON_A
  • Button.Two
  • Button.Four
Press
  • Left hand: VR_BUTTON_Y
  • Right hand: VR_BUTTON_B
  • Button.PrimaryThumbstick
  • Button.SecondaryThumbstick
Press / Touch
  • Left hand: VR_BUTTON_AXIS_0_LEFT
  • Right hand: VR_BUTTON_AXIS_0_RIGHT
  • Axis2D.PrimaryThumbstick
  • Axis2D.SecondaryThumbstick
Horizontal / Vertical
Movement
  • 0 for the X axis
  • 1 for the Y axis
[-1;1]
  • When moving along the X axis: -1 for right-to-left movement, 1 for left-to-right movement
  • When moving along the Y axis: -1 for forward movement, 1 for backward movement
  • Axis1D.PrimaryIndexTrigger
  • Axis1D.SecondaryIndexTrigger
Press / Touch
  • Left hand: VR_BUTTON_AXIS_1_LEFT
  • Right hand: VR_BUTTON_AXIS_1_RIGHT
  • Axis1D.PrimaryIndexTrigger
  • Axis1D.SecondaryIndexTrigger
Squeeze 2 for the Trigger axis [0;1]
  • Axis1D.PrimaryHandTrigger
  • Axis1D.SecondaryHandTrigger
Squeeze
  • Left hand: VR_BUTTON_GRIP_LEFT
  • Right hand: VR_BUTTON_GRIP_RIGHT

Valve Knuckles Controller Inputs
Входы контроллера поворотных кулаков клапанов
#

Примечание
This type of controller is supported by Varjo devices as well.Этот тип контроллера также поддерживается устройствами Varjo.

Valve Knuckles controller axes and buttons (Image sourced from steamcommunity.com, courtesy of steamcommunity.com)Оси и кнопки контроллера клапанных кулаков (изображение взято из steamcommunity.com, любезно предоставлено steamcommunity.com)
Примечание
Currently, UNIGINE doesn't offer support for the Force Sensor and Finger Tracking inputs.В настоящее время UNIGINE не предлагает поддержку входных данных Force Sensor и Finger Tracking.
Button/
Axis
Interaction Type UNIGINE Button/
Axis
UNIGINE Axis Number Axis Range
A Button Press
  • Left hand: VR_BUTTON_GRIP_LEFT
  • Right hand: VR_BUTTON_GRIP_RIGHT
B Button Press
  • Left hand: VR_BUTTON_X
  • Right hand: VR_BUTTON_A
System Button Press
  • Left hand: VR_BUTTON_SYSTEM_LEFT
  • Right hand: VR_BUTTON_SYSTEM_RIGHT
Trigger Press / Touch
  • Left hand: VR_BUTTON_AXIS_1_LEFT
  • Right hand: VR_BUTTON_AXIS_1_RIGHT
Trigger Squeeze 2 for the Trigger axis [0;1]
Track Button (Trackpad) Press / Touch
  • Left hand: VR_BUTTON_AXIS_0_LEFT
  • Right hand: VR_BUTTON_AXIS_0_RIGHT
Track Button (Trackpad) Horizontal / Vertical Movement
  • 0 for the X axis
  • 1 for the Y axis
[-1;1]
  • When moving along the X axis: -1 for right-to-left movement, 1 for left-to-right movement
  • When moving along the Y axis: -1 for forward movement, 1 for backward movement
Thumbstick Press / Touch
  • Left hand: VR_BUTTON_AXIS_0_LEFT
  • Right hand: VR_BUTTON_AXIS_0_RIGHT
Thumbstick Horizontal / Vertical Movement
  • 0 for the X axis
  • 1 for the Y axis
[-1;1]
  • When moving along the X axis: -1 for right-to-left movement, 1 for left-to-right movement
  • When moving along the Y axis: -1 for forward movement, 1 for backward movement
Grip Press / Touch
  • VR_BUTTON_GRIP_LEFT for the left-hand controller
  • VR_BUTTON_GRIP_RIGHT for the right-hand controller

Head-Mounted Displays
Дисплеи, устанавливаемые на голове
#

The VR system allows you to process input from head-mounted displays (HMDs) via the InputVRHead class.Система виртуальной реальности позволяет обрабатывать ввод с дисплеев, установленных на головах (HMDs), через класс InputVRHead.

Примечание
The InputVRDevice class is alos used for managing HMD input.Класс InputVRDevice также используется для управления вводом HMD.

Base Stations
Базовые станции
#

A VR base station helps the HMD and controllers to track their exact positions, enhancing the immersion of room-scale virtual reality experience.Базовая станция виртуальной реальности помогает HMD и контроллерам отслеживать их точное местоположение, усиливая погружение в виртуальную реальность в масштабе помещения.

The InputVRDevice and InputVRBaseStation classes is used to handle base station input.Классы InputVRDevice и InputVRBaseStation используются для обработки входных данных базовой станции.

VR Trackers
VR-трекеры
#

A VR tracker allows embedding real-world objects into the VR environment. You can attach it to a real thing that needs to be tracked. In Mixed Reality, you can install the VR tracker on a camera or player to track its position in the virtual world. VR-трекер позволяет встраивать объекты реального мира в среду виртуальной реальности. Вы можете прикрепить его к реальному объекту, который необходимо отслеживать. В смешанной реальности вы можете установить VR-трекер на камеру или плеер, чтобы отслеживать его положение в виртуальном мире.

The InputVRDevice and InputVRTracker classes is used to manage tracker input.Классы InputVRDevice и InputVRTracker используются для управления входными данными трекера.

Последнее обновление: 27.02.2024
Build: ()