WHAT IS
3D RAD?
CLICK HERE
TO FIND OUT!


RigidBody


RigidBody is a customizable solid object supporting collision detection and realistic physics simulation.

Run-time, it is usually invisible and its visual aspect is provided by a SkinMesh attached to it. However, in the Virtual Editor (and run-time, mainly for debug purposes) it is visualized via a placeholder-mesh.

You can use your favorite 3d modeling application to create new rigid-bodies and add them to the RigidBody object library.

Your own 3d models are used by the RigidBody object as a reference to implement collision detection or determine mass distribution (which ultimately determines physics behavior). Please see this tutorial for details.

The RigidBody can act either as a static object (for example a terrain or the walls in a dungeon) or as a dynamic object (a car body, an airplane fuselage, a bullet, a falling rock etc). Please see Total Mass parameter (below) for more.

FUNCTIONS

The RigidBody object will be subject to physics laws as soon as the project is started. For example, if it is dynamic and it is linked to a G-Force and a Terrain object, it will fall and rebound realistically.

After adding a RigidBody object to your project, you can configure it by double-clicking it in the Object List.




Enabled at start

If this option is not checked, the rigid-body will only perform physics simulation when the object is shown by another object, like for example EventOnInput.

Note that physics is enabled by showing the object, instead of starting it, because being enabled, for a RigidBody object, doesn't just mean that its physics simulation is performed, but also that its placeholder geometry is rendered run-time. But see Display placeholder geometry for more.

Display geometry

Check this option to visualize the rigid-body's placeholder model, run-time. Note that the model is not shown if the object is disabled (see Enabled at start).

In the Virtual Editor you can only hide the placeholder mesh by right-clicking the item in the Object List.

Path

If you attach the RigidBody object to a path by linking it to a Path object then it will try to follow the pre-defined course.

NOTE: the object will tend to follow the path. You must tweak the Force intensity and Torque intensity factors to achieve an accurate path-following behavior for your specific object.

The remarkable advantage in mixing path following with physics this way (instead of using SkinMesh object's path functionality for example) is that your object can interact realistically with the environment (collisions, forces, joints) while traveling along the pre-defined course.

  • Loop Count. This is the number of times the object will loop around the path. Non integer values (e.g. 0.5) are supported.


  • Speed. Path following speed. When this value is 1, the whole path is completed in one second. Negative values are supported (reverse).

    Note that the relative speed along a specific portion of the path depends on the number of nodes defined along the segment. In particular, the more nodes are defined, the slower the speed. This property allows you to accurately program speed variations.


  • Force intensity. The bigger the value, the stronger the attraction force between the path and the object. To avoid jittering you should compensate stronger forces by adding some Linear damping (see Physics, below).


  • Torque intensity. The bigger the value, the stronger the torque used to keep the object aligned with the path direction. To avoid wobbling you should compensate stronger toques by adding some Angular damping (see Physics, below).


  • Behavior. When the dynamic object is stopped and re-started (for example by an object like EventOnInput) it can start again from path's beginning, resume from where it was when stopped or move the opposite way along the path.


  • Follow At Start. If this option is not checked, the object will follow the path only when started by another object, like for example EventOnInput.


  • Physics

  • Use bounding sphere as body. If this option is checked, the 'solid' volume of your object will be a sphere instead of a detailed physics model derived from user-defined geometry (.spg, .ply/pol).

    This simplified 'solid' volume is faster to process. It is automatically created from the bounding sphere of the placeholder mesh and it is recommended over the spg/ply-based version where accuracy for collision detection and simulation is not required.


  • Total Mass. Basically the weight of the object. As a reference, total mass for one liter of water (1 kg or 2.2 pounds) is about 1.0.

    IMPORTANT! Setting this value to -1 will make the object static (infinite weight). This is typically used for scenery elements, like terrain, buildings, trees and so on.


  • Restitution (between 0 and 1). The bounciness of the object when colliding with other objects. The smaller the factor, the lower the bounciness.

    Note that when two objects collide, the actual restitution is the average of the restitution factors of the two objects.


  • Friction. Resistance encountered when the object is moved in contact with another object. Zero means that there is no resistance. Set a very high value for no-slipping friction (max is 3.402823466e+38).

    Note that when two objects collide, the actual friction depends on the factors of both objects.


  • Rolling friction (wheel). You can set lateral and rolling friction independently by enabling this setting. When rolling friction is enabled, the Friction factor (above) is used for lateral friction.


  • Surface stickiness. This advanced setting allows you to minimize small-scale jittering for objects that are pushed together by strong forces (e.g. unusual gravity). Depending on force intensity and masses involved, you may have to adjust this factor to achieve perfectly still bodies.


  • Surface drive. A special repulsion force is applied to separate two surfaces when they tend to 'sink' one into the other. This advanced setting allows you to tweak this force and simulate soft surfaces or minimize small-scale rebounding for rolling objects.

    The bigger the value, the stronger the repulsion force. Negative values are valid.


  • Linear Damping (between 0 and 1). Damping weakens the kinetic energy of the object. The effect on a moving body is similar to drag (resistance to motion through a fluid, for example air friction). Setting this value to 1 causes zero damping. Zero produces maximum damping.


  • Angular Damping (between 0 and 1). Damping can also be applied to rotation. See previous parameter for details.


  • Other Controls

    The remaining controls on the dialog are common to all objects.
    They are explained here.


    INTERNAL PARAMETERS


    The following internal parameters can be accessed by using event objects like EventOnValue or Script:

  • Current speed, in meters per second.
  • Current spin, in degrees per second.