This page has been translated automatically.
Getting Started
Migrating to UNIGINE 2.0
C++ API Migration
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
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.

Setting Up Physics

The Physics settings panel allows you to adjust global physics-related settings: values set via this panel will be applied to all physical objects in the scene. The panel can be invoked by pressing the P key or via the Menu bar by clicking Windows -> Physics Settings.

For more information on how to add physical properties to objects and set up physical interactions, see the articles in the Physics section.

Physics editor Settings

Global physics settings window

The panel contains the following settings:

FPSFixed framerate used to simulate physics. Physics framerate is independent of the rendering one.
Notice
Too high physics framerate can cause rendering lags. If physics takes more than 40 ms, further calculations are skipped.
GameScale factor to speed up or slow down the game time. That includes both rendering rate (for example, particles spawn rate and material offsets) and physics ticks.
SoundScale factor to speed up or slow down the sound play.
Physics scaleScale factor to speed up or slow down the physics simulation time, i.e how frequently physics is simulated (for example, slowing down of body's velocity). Only physics ticks are affected, while everything else is rendered at a normal speed.
IterationsThe number of iterations for physics during one physics tick. Each iteration the full cycle of physics simulation is performed:
  • flush() from the world script is called
  • collision detection is calculated
  • joints are solved
Notice
High number of iterations increase stability, but also result in a higher load. If physics takes more than 40 ms, next iterations are automatically skipped.
Linear dampDamping of objects' linear velocities. This value is added to the linear damping set individually for each object.
  • The higher the value, the faster objects stop moving along the straight line.
Angular dampDamping of objects' angular velocities. This value is added to the angular damping set individually for each object.
  • The higher the value, the faster objects stop their rotation.
Max linear velocityThe maximum possible linear velocity.
  • This value is compared to the maximum linear velocity set for each body, and the lowest value serves as a threshold to clip the actual linear velocity, if necessary.
Max angular velocityThe maximum possible angular velocity.
  • This value is compared to the maximum angular velocity set for each body, and the lowest value serves as a threshold to clip the actual angular velocity, if necessary.
Frozen linear velocityLinear velocity at which the object becomes frozen, if it keeps both of its velocities (angular and linear) lower than the freeze velocities.
  • This value is compared to the Frozen linear velocity set for each body, and the highest value serves as a threshold to compare actual velocity with.
Frozen angular velocityAngular velocity at which the object becomes frozen, if it keeps both of its velocities (angular and linear) lower than the freeze velocities.
  • This value is compared to the Frozen angular velocity set for each body, and the highest value serves as a threshold to compare actual velocity with.
Frozen framesThe number of frames, during which an object should keep both its angular and linear velocities under the specified level to become frozen.
Penetration factorThe factor used to define the reverse force of extrusion by unwanted objects tunneling.
  • The minimum value of 0 means there is no extrusion by contact penetration.
  • The maximum value of 1 means objects are extruded with the maximum possible impulse.
Penetration toleranceDistance in units indicating how deeply one object can penetrate another to be extruded.
GravityThree coordinates of the vector used to define a gravity. It creates a world-wide uniform force field. Gravity is applied at the center of mass of each body (except for dummy body) to calculate its acceleration.
  • Normally gravity vector should point downwards, i.e. have negative value along the Z axis.
  • The higher the value along one of the axes, the stronger gravity presses in the specified direction.
Last update: 2017-07-03
Build: ()