SoftConstraint

A soft constraint is a class that allows you to manipulate the different type of soft body constraint and access their properties. A soft constraint can simulate any type of physical limitation or restriction that can be applied to the movements of a specific node or point on a SoftBody or between two masses (either another SoftBody or an existing RigidBody).

A soft constraint can simulate anything from a pin on a cloth, the string of a balloon to the angular and rotational constraint of an inflated wheel. They are particularly useful in the process of making your worlds more realistic and are a great addition to use with your existing SoftBody.

See Also

Static Variables


Name Description
softbodyA Reference to the parent SoftBody attached to the active SoftConstraint.
data Access the properties and settings for the active SoftConstraintType.
pivotA First pivot of the constraint which is relative to softbodyA.
axisA Rotation in Euler angles relative to softbodyA.
uid Unique id to globally identify the SoftConstraint.

Variables


Name Description
name A name to identify the SoftConstraint within its parent SoftBody.
enabled Control wheter or not the active SoftConstraint is enabled or disabled.
draw_size Specify the debug draw scale for visual debugging in the 3d viewport (editor only).

Functions


Name Description
Build Build the SoftConstraint.

SoftConstraintType


Available type of SoftBody constraints.

  • kPin: Pin the closest node to a static location by setting its mass to 0.
  • kAnchor: Create a point to point constraint either in SoftBody local space or relative to an existing RigidBody.
  • kLinearJoint: This type of joint will restrict the movement of the soft body. It is available only when a SoftBody is using clusters; this type of constraint creates a linear (movement only) joint between either a soft or a rigid body.
  • kAngularJoint: This type of joint will restrict the rotational movements of the soft body to a specific axis. It is only available when a SoftBody is using clusters; this type of constraint creates an angular joint (rotation only) between either a soft body or a rigid body.

SoftConstraintData


Access the properties available to the SoftConstraint based on its current SoftConstraintType.

Static Variables


Name Description
type The SoftConstraintType of the active SoftConstraint.
pinconstraint Access the properties and settings of a PinConstraint.
anchorconstraint Access the properties and settings of a AnchorConstraint.
linearjointconstraint Access the properties and settings of a LinearJointConstraint.
angularjointconstraint Access the properties and settings of a AngularJointConstraint.




NRG - API 2022.4.384543 - Fri Nov 4 2022
Copyright © 2022 nrgcore.com. All Rights Reserved. Terms of Service - Privacy Policy - EULA