This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
Звуковые объекты
Объекты поиска пути
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
Учебные материалы

World Trigger

A world trigger is a cuboid shaped object, which triggers events when any node (physical or not) gets inside or outside of it. The trigger can detect a node of any type by its bound object and can be used to access node's components and parameters.World Trigger - это объект в форме куба, который выполняет функции обратного вызова при вхождении любых объектов в ограничиваемый им объем или покидания объектами этого объема. Триггер может обнаруживать ноды любого типа (как с физическими свойствами, так и без них) по их ограничивающему контуру и может использоваться для доступа к компонентам и параметрам узла.

Примечание
Some "abstract" objects do not have bounds; therefore, they do not interact with World Trigger (regardless of the Triggers Interaction option state): Dummy Object (if it has no body assigned)Некоторые «абстрактные» объекты не имеют границ; поэтому они не взаимодействуют с World Trigger (независимо от того включена опция Triggers Interaction или нет):

World Trigger affecting meshesВзаимодействие World Trigger с мешами

See alsoСмотрите также#

Creating a World TriggerСоздание World Trigger#

To create World Trigger via UnigineEditor:Чтобы создать World Trigger через UnigineEditor:

  1. On the Menu bar, choose Create -> Logic -> World TriggerВ меню выберите Create -> Logic -> World Trigger

  2. Place the node in the scene.Поместите узел в сцену.

Editing a World TriggerРедактирование World Trigger#

In the Node tab of the Parameters window, you can adjust the following parameters of World Trigger:На вкладке Node окна Parameters вы можете настроить следующие параметры World Trigger:

Node tab of the World Trigger nodeВкладка Node узла World Trigger

Bounding Box ParametersПараметры ограничивающей рамки#

A set of bounding box parameters:Набор параметров ограничивающей рамки:

Edit Size

Toggles the editing mode for the World Trigger node on and off. When enabled, the bounding box sides that can be resized are highlighted with the colored rectangles. To change the size of a side, drag the corresponding rectangle.Включает и выключает режим редактирования для узла World Trigger. Если этот параметр включен, стороны ограничивающего прямоугольника, размер которых можно изменить, выделяются цветными прямоугольниками. Чтобы изменить размер стороны, перетащите соответствующий прямоугольник.

Touch Toggles the touch mode for World Trigger on and off. With this mode on, World Trigger reacts to the node at a partial contact. Otherwise, World Trigger reacts only if the whole bounding box gets inside it.Включает и выключает сенсорный режим для World Trigger. В этом режиме World Trigger реагирует на узел при частичном контакте. В противном случае World Trigger реагирует только в том случае, если весь ограничивающий прямоугольник попадает внутрь него.
Size The size of the World Trigger bounding box along the X, Y, and Z axes, in units.Размер ограничивающего прямоугольника World Trigger по осям X, Y и Z в юнитах.

Handling EventsОбработка событий#

To perform specific actions when a node enters or leaves the World Trigger, you should implement event handlers that receive a Node as the first argument. Then, you should subscribe to the Enter and/or Leave events and call connect().Чтобы выполнять определенные действия, когда нода входит или выходит из World Trigger, следует реализовать обработчики событий, которые получают Node в качестве первого аргумента. Затем следует подписаться на события Enter и/или Leave и вызвать connect().

Исходный код (C++)
// subscribe to the Enter event when a node enters the world trigger with your handler
worldTrigger->getEventEnter().connect(enter_event_handler);
// subscribe to the Leave event when a node leaves the world trigger with your handler
worldTrigger->getEventLeave().connect(leave_event_handler);
Исходный код (C#)
// subscribe to the Enter event when a node enters the world trigger with your handler
worldTrigger.EventEnter.Connect(enter_event_handler);
// subscribe to the Leave event when a node leaves the world trigger with your handler
worldTrigger.EventLeave.Connect(leave_event_handler);
Последнее обновление: 06.02.2024
Build: ()