This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
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
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine.PhysicalForce Class

Inherits: Physical

This class is used to simulate a point force that pulls physical bodies up to or away from the point. It can also rotate them around the force center.

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#

  • An article on Physical Force
  • A set of UnigineScript API samples located in the <UnigineSDK>/data/samples/physicals/ folder:
    • force_00
    • force_01

PhysicalForce Class

Properties

float Rotator#

The current rotation force that will be applied to objects in the physical force radius.
set
Updates the rotation force that will be applied to objects in the physical force radius.
set value - Rotation force value. If a positive value is specified, object will be rotated clockwise. If a negative value is specified, objects will be rotated counterclockwise.

float Radius#

The current radius set for applying the physical force.
set
Updates the radius for applying the physical force.
set value - Radius in units. If a negative value is provided, 0 will be used instead.

float Attractor#

The current attraction force applied to objects in the physical force radius. positive values pull objects away from the force point, negative values pull them up to it.
set
Updates the attraction force that will be applied to objects in the physical force radius.
set value - Attraction force value. If a positive value is specified, objects will be pulled away from the force point. If a negative value is specified, objects will be pulled up to the force center.

float Attenuation#

The current attenuation factor for the physical force.
set
Updates the attenuation factor for the physical force.
set value - Attenuation factor.

Members


static PhysicalForce ( float radius ) #

Constructor. Creates a physical force node with the specified radius in units.

Arguments

  • float radius - The radius of the physical force node in units.

static PhysicalForce Cast ( Node node ) #

Casts a PhysicalForce out of the Node instance.

Arguments

  • Node node - Node instance.

Return value

PhysicalForce instance.

static PhysicalForce Cast ( Physical base ) #

Casts a PhysicalForce out of the Physical instance.

Arguments

  • Physical base - Physical instance.

Return value

PhysicalForce instance.

static int type ( ) #

Returns the type of the node.

Return value

Physical type identifier.
Last update: 2019-08-16
Build: ()