This page has been translated automatically.
Видеоуроки
Interface
Essentials
Advanced
Полезные советы
Программирование на C#
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Настройки и предпочтения
Работа с проектами
Настройка параметров узла
Setting Up Materials
Setting Up Properties
Освещение
Landscape Tool
Sandworm (Experimental)
Использование инструментов редактора для конкретных задач
Extending Editor Functionality
Встроенные объекты
Nodes
Objects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
Программирование
Основы
Настройка среды разработки
Примеры использования
UnigineScript
C++
C#
Унифицированный язык шейдеров UUSL
File Formats
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
Работа с контентом
Оптимизация контента
Материалы
Art Samples
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Physical Force

A physical force is a spherical object with a force that is applied to its center and attenuates as follows:

Here:

Name Description
distance Distance between the sphere center and the object.
radius Radius of the sphere in which the force is applied.
attenuation Force attenuation factor.

All physical bodies and particles that are within the radius of the force are pulled up to or away from the center of the physical force node. Also the bodies and particles can be rotated around the center of the physical force node.

Notice
The physical force will affect particles only if their physical mass is nonzero. The physical mass for the particles can be set on the Particles tab of the Parameters window.

Notice
The physical force can affect only a cloth, a rope or a rigid body. If the rigid body is used, a shape should be also assigned.

See also#

  • The PhysicalForce class to manage physical force nodes via API
  • A set of samples located in the data/samples/physicals folder:
    1. force_00
    2. force_01
  • The fragment from the video tutorial on physics demonstrating the force effect

Adding Physical Force#

To add a physical force to the scene via UnigineEditor:

  1. Run the project with UnigineEditor.
  2. On the Menu bar, click Create -> Physics -> Physical Force.

  3. Click somewhere in the world to place the physical force.

The new physical force node will be added to UnigineEditor and you will be able to edit it via the Parameters window. By default, the radius of the node is 1.

Editing Physical Force#

In the Physical Force section (Parameters window -> Node tab), you can adjust the following parameters of the physical force:

Edit Size Toggles the editing mode for the physical force node. When enabled, the radius of applying the physical force can be changed: each axis is highlighted with the colored circle. To change the radius along the axis, drag the corresponding circle.

Physical Mask Physical mask. The physical mask of the physical force must match the physical mask of the physical object. Otherwise, the physical force won't affect the object.
Radius Radius for applying the physical force in units.
Attenuation Attenuation factor indicating how much the physical force decreases when the objects move away from the force center.
Attractor Attraction force applied to objects in the physical force radius. If a positive value is provided, objects will be pulled away from the force point. If a negative value is provided, objects will be pulled up to the force point.
Rotator Rotation force that is applied to objects in the physical force radius. If a positive value is provided, objects will be rotated clockwise. If a negative value is provided, objects will be rotated counter-clockwise.
Last update: 24.11.2020
Build: ()