RigidConstraint

Structure that allows you to manipulate different types of rigid body constraint. A rigid constraint can simulate any type of physical limitation or restriction that can be applied to the movements of one or between two masses (in other worlds two RigidBody). These masses can either be a single Object or a SkeletalMesh Bone associated with an existing PhysicObject.

A rigid constraint is built to handle a certain amount of impulse or pressure that can be applied to them. If that limit is violated the constraint will breaks. Further logic based on this system can be handled in code using the programming interface below.

See Also

Static Variables


Name Description
rigidbodyA Parent RigidBody where the RigidConstraint is contained.
pivotA First pivot of the constraint which is relative to rigidbodyA.
rotationA Rotation in Euler angles relative to rigidbodyA.
pivotB Second pivot of the RigidConstraint which is relative to rigidbodyB.
rotationB Rotation in Euler relative to rigidbodyB.
uid Unique id of the RigidConstraint to identify it globally.
data Access to the RigidConstraint properties for the active RigidConstraintType the constraint was created with.

Variables


Name Description
draw_size Size of the RigidConstraint debug draw (editor only) to use.
name A unique name to identify the RigidConstraint.
breaking_impulse_threshold Control how much impulse the current RigidConstraint can handle before it breaks.
num_solver_iterations Control the number of time the solver should evaluate the RigidConstraint per frame.
collision_between_bodies Enable or disable collision between the two RigidBody involved in the RigidConstraint.
enabled Control whether or not the current RigidConstraint should be active.
rigidbodyB Reference to the second RigidBody involved in the RigidConstraint.

Functions


Name Description
GetAppliedImpulse Get the current ammount of impulse applied to the RigidConstraint.
ReachBreakingPoint Evaluate wheter or not the active RigidConstraint have reach its breaking point.
Build Manually rebuilt the RigidConstraint.

RigidConstraintData


Access the properties available to the RigidConstraint based on its current RigidConstraintType.

Static Variables


Name Description
type The RigidConstraintType of the active RigidConstraint.
fixedconstraint Access the property available for a FixedConstraint RigidConstraintType.
ballconstraint Access the property available for a BallConstraint RigidConstraintType.
hingeconstraint Access the property available for a HingeConstraint RigidConstraintType.
twistconstraint Access the property available for a TwistConstraint RigidConstraintType.
sliderconstraint Access the property available for a SliderConstraint RigidConstraintType.
genericconstraint Access the property available for a GenericConstraint RigidConstraintType.

RigidConstraintType


Available types of RigidConstraint.

  • kFixed: Creates an attachment; similar as a pin either in world space or relative to another existing rigid body.
  • kBall: Create a point to point constraint.
  • kHinge: Create a movable joint mechanism like the one found on windows or doors.
  • kTwist: Create cone twist constraints such as the one found on levers or pully.
  • kSlider: Create a linear constraint that allows the connected RigidBody to slide from one point to another.
  • kGeneric: All-in-one 6 degrees of freedom constraint capable to simulate all others constraint type. Its flexibility allows you to customize your own RigidConstraint as you see fit.

MotorType


Constant values that enumerate the different type of motor impulse that can be attached to RigidConstraint.

  • kDisabled: The motor is disabled.
  • kEnabled: Regular motor applying either linear or rotational impulse.
  • kSpring: Spring-motor that can apply either a linear or angular spring impulse to the RigidConstraint.




NRG - API 2022.3.383570 - Thu Jul 28 2022
Copyright © 2022 nrgcore.com. All Rights Reserved. Terms of Service - Privacy Policy - EULA