This page has been translated automatically.
编程
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的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 Params tab of the Nodespanel.

Notice
The physical force can affect only a cloth, aropeor arigidbody. If the rigid body is used, ashape should be also assigned.

See also

  • A PhysicalForceclass to edit physical force nodes via UnigineScript
  • A set of samples located in the data/samples/physicals folder:
    1. force_00
    2. force_01

Adding Physical Force

To add a physical force to the scene via UnigineEditor:

  1. Run UnigineEditor.
  2. On the Menu bar, click Create -> Effect -> 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 Nodes panel. By default, the radius of the node is 1.

Editing Physical Force

On the Force tab of the Nodespanel, you can adjust the following parameters of the physical force:

Physical 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.
Atten 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: 2017-07-03
Build: ()