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

Player Spectator

A player spectator is a free flying camera without a physical body, which is approximated with a sphere and therefore can collide with objects (however, it cannot push or interact with them).

As well as for a player actor, the viewing orientation of a player spectator in space is defined by 2 angles - theta and phi - and by the up vector that usually coincides with the Z axis:

  • When changing the theta angle, the vertical view direction of the player actor changes.
  • When changing the phi angle, the horizontal view direction and the basis of the player actor change.

A player spectator can be used to create a spectator mode that allows for observing the world. Due to collisions, movement of the camera can be limited.

Notice
As any transformation of a player forces it to recalculate its inner state (position, direction, angles and so on), the up direction of the player's viewport may become "negative forward". And then transformation will be recalculated by using this direction, causing flip of the player's basis. To avoid such flipping, the theta and phi angles should be recalculated by using the current viewing orientation of the player.

See also#

Creating a Spectator#

To create a spectator camera, do the following:

  1. On the Menu bar, choose Create -> Camera -> Spectator.

  2. Place the camera somewhere in the world and specify the required parameters via the Parameters window.

Editing a Player Spectator#

In the Node tab, you can adjust the bit masks, viewing frustum parameters, and post-process materials, as well as the specific physical parameters of the camera described below.

Player Spectator parameters

Physical parameters#

View Direction X, Y, and Z values of the vector defining where the player's view is directed.
Controlled Toggles controls of the player spectator on and off (the player's response to them).
Collision Toggle on and off the player's ability to collide with other objects.
Collision Mask A bit mask defining nodes the player is able to collide with.
Collision Radius The radius of the player's sphere.
Min Velocity The default velocity of the player.
Max Velocity Sets the velocity of the spectator, which is used while the spectator runs (the run control state is pressed).
Min Theta The minimum theta angle (zenith angle, also known as pitch angle) that determines how far upward the player can look.
Max Theta The maximum theta angle (zenith angle, also known as pitch angle) that determines how far downward the player can look.
Acceleration The player's acceleration.
Damping The player's velocity damping with the time.
Turning The velocity of the player's turning action.
Phi The phi angle (azimuth angle, also known as yaw angle). This angle determines the horizontal viewing direction, i.e. left or right.
Theta The theta angle (zenith angle, also known as pitch angle). This angle determines the vertical viewing direction, i.e. upward and downward. The value is clamped between the minimum and the maximum theta angle.
Num Contacts The number of contacts, in which the player's sphere participates.
Last update: 10.03.2022
Build: ()