3D Constraints

Function CreatePointConstraint(actorA, pxA, pyA, pzA)

A type of constraint that allows two actors (or an actor and the world) to move freely relative to each other while ensuring that one point on each body remains coincident. Essentially, it ensures that the two actors stay connected at a single point, but without restricting their relative rotations. This kind of constraint is useful when you need a connection that allows full rotation in all directions, such as a pendulum, ball joint, or even some suspension systems.


Function CreatePointConstraintEx(actorA, actorB, pxA, pyA, pzA, pxB, pyB, pzB)

A type of constraint that allows two actors (or an actor and the world) to move freely relative to each other while ensuring that one point on each body remains coincident. Essentially, it ensures that the two actors stay connected at a single point, but without restricting their relative rotations. This kind of constraint is useful when you need a connection that allows full rotation in all directions, such as a pendulum, ball joint, or even some suspension systems.


Sub SetPointPivotA(constraint_id, x, y, z)

Sets the pivot point on the first actor (Body A) of the constraint. This pivot point defines the specific location in the local space of Body A where the point-to-point constraint is anchored.

See also

GetPointPivotA(), SetPointPivotB()


Sub SetPointPivotB(constraint_id, x, y, z)

Sets the pivot point on the second actor (Body B) of the constraint. This pivot point defines the specific location in the local space of Body B where the point-to-point constraint is anchored.

See also

GetPointPivotA(), SetPointPivotB()


Function CreateHingeConstraint(actorA, frameA, useReferenceFrameA)

Simulates a hinge joint, which allows two actors (or an actor and the world) to rotate around a single axis while restricting movement along the other axes. This is similar to the way a door swings on its hinges or how an elbow joint functions in the human body.

actorA = CreateCubeActor(100) 'Creates a cube actor
frameA = DimMatrix(4, 4) 'A transform matrix must be a 4x4 matrix
SetIdentityMatrix(frameA, 4) 'Sets frameB to a 4x4 identity matrix
SetMatrixTranslation(frameA, 0, 1, 0) 'Sets the attach point of the constraint to the top of the cube
hinge = CreateHingeConstraint(actorA, frameA, true)

Note: It is recommended to use CreateHingeConstraintEx() in most cases.


Function CreateHingeConstraintEx(actorA, actorB, frameA, frameB, useReferenceFrameA)

Simulates a hinge joint, which allows two actors (or an actor and the world) to rotate around a single axis while restricting movement along the other axes. This is similar to the way a door swings on its hinges or how an elbow joint functions in the human body.

actorA = CreateCubeActor(100) 'Creates a cube actor
frameA = DimMatrix(4, 4) 'A transform matrix must be a 4x4 matrix
SetIdentityMatrix(frameA, 4) 'Sets frameB to a 4x4 identity matrix
SetMatrixTranslation(frameA, 0, 1, 0) 'Sets the attach point of the constraint to the top of the cube

actorB = CreateCubeActor(100) 'Creates a cube actor
frameB = DimMatrix(4, 4) 'A transform matrix must be a 4x4 matrix
SetIdentityMatrix(frameB, 4) 'Sets frameB to a 4x4 identity matrix
SetMatrixTranslation(frameB, 0, 1, 0) 'Sets the attach point of the constraint to the top of the cube

hinge = CreateHingeConstraint(actorA, actorB, frameA, frameB, true)

Note: It is recommended to use CreateHingeConstraintEx() in most cases.


Function CreateSlideConstraint(actorA, frameInB_matrix, useLinearReferenceFrameA)

A type of constraint that restricts the motion between two actors (or between an actor and the world) in such a way that they can slide along a specific axis and rotate around the same axis, while limiting or allowing movement along other axes. This constraint is similar to a prismatic joint with added rotational freedom, making it useful for simulating objects like pistons, sliding doors, or rail systems.

See also

CreateSlideConstraintEx(), SetIdentityMatrix(), SetMatrixTranslation(), SetMatrixRotation()

Note: It is recommended to use CreateSlide ConstraintEx() in most cases.


Function CreateSlideConstraintEx(actorA, actorB, frameInA_matrix, frameInB_matrix, useLinearReferenceFrameA)

A type of constraint that restricts the motion between two actors (or between an actor and the world) in such a way that they can slide along a specific axis and rotate around the same axis, while limiting or allowing movement along other axes. This constraint is similar to a prismatic joint with added rotational freedom, making it useful for simulating objects like pistons, sliding doors, or rail systems.

actorA = CreateCubeActor(100) 'Creates a cube actor
frameA = DimMatrix(4, 4) 'A transform matrix must be a 4x4 matrix
SetIdentityMatrix(frameA, 4) 'Sets frameB to a 4x4 identity matrix
SetMatrixTranslation(frameA, 0, 0, 0) 'Sets the attach point of the constraint to center of the cube
SetMatrixRotation(frameA, 0, 90, 0) 'Rotates the constraint axis by 90 degrees around y

actorB = CreateCubeActor(100) 'Creates a cube actor
frameB = DimMatrix(4, 4) 'A transform matrix must be a 4x4 matrix
SetIdentityMatrix(frameB, 4) 'Sets frameB to a 4x4 identity matrix
SetMatrixTranslation(frameB, 0, 50, 0) 'Sets the attach point of the constraint to the top of the cube
SetMatrixRotation(frameB, 0, 90, 0) 'Rotates the constraint axis by 90 degrees around y
slide = CreateSlideConstraintEx(actorA, actorB, frameA, frameB, true)

Note: It is recommended to use CreateSlideConstraintEx() in most cases.


Function CreateConeConstraint(actorA, rbAFrame_matrix)

The Cone Constraint is a type of joint constraint used to simulate realistic rotational movement between two actors (or between an actor and the world) with specific angular limits. This constraint is especially useful for simulating ball-and-socket joints with some twisting freedom but restricted cone-like movement, such as human shoulders or robotic arms.

actorA = CreateCubeActor(100) 

rbA = DimMatrix(4, 4) 'A transform matrix should be a 4x4 matrix
SetIdentityMatrix(rbA, 4) 'This will set rbA to a 4x4 identity matrix
SetMatrixTranslation(rbA, 0, 40, 0) 'Set the point where the constraint connects to actorA to 1 unit above its origin
SetMatrixRotation(rbA, 0, 0, 0) 'Sets the angle the constraint is attached at to 0 on all axes

test_cone = CreateConeConstraint( actorA, rbA )

Note: It is recommended to use CreateConeConstraintEx() in most cases.

See also

CreateConeConstraintEx(), SetIdentityMatrix(), SetMatrixTranslation(), SetMatrixRotation()


Function CreateConeConstraintEx(actorA, actorB, rbAFrame_matrix, rbBFrame_matrix)

The Cone Constraint is a type of joint constraint used to simulate realistic rotational movement between two actors (or between an actor and the world) with specific angular limits. This constraint is especially useful for simulating ball-and-socket joints with some twisting freedom but restricted cone-like movement, such as human shoulders or robotic arms.

actorA = CreateCubeActor(100) 
actorB = CreateCubeActor(100)

rbA = DimMatrix(4, 4) 'A transform matrix should be a 4x4 matrix
SetIdentityMatrix(rbA, 4) 'This will set rbA to a 4x4 identity matrix
SetMatrixTranslation(rbA, 0, 40, 0) 'Set the point where the constraint connects to actorA to 1 unit above its origin
SetMatrixRotation(rbA, 0, 0, 0) 'Sets the angle the constraint is attached at to 0 on all axes

rbB = DimMatrix(4, 4) 'A transform matrix should be a 4x4 matrix
SetIdentityMatrix(rbB, 4) 'This will set rbA to a 4x4 identity matrix
SetMatrixTranslation(rbB, 0, 40, 0) 'Set the point where the constraint connects to actorA to 1 unit above its origin
SetMatrixRotation(rbB, 0, 0, 0) 'Sets the angle the constraint is attached at to 0 on all axes

test_cone = CreateConeConstraint( actorA, rbA )

Sub DeleteConstraint(constraint_id)

Removes a constraint.


Sub GetConstraintFrameOffsetA(constraint_id, ByRef x, ByRef y, ByRef z, ByRef rx, ByRef ry, ByRef rz)

Gets the frame offset for actor A associated with a particular constraint. This frame offset defines the position and orientation of actor A relative to the constraint’s anchor point.

See also

GetConstraintFrameOffsetB()


Sub getConstraintFrameOffsetB(constraint_id, ByRef x, ByRef y, ByRef z, ByRef rx, ByRef ry, ByRef rz)

Gets the frame offset for actor B associated with a particular constraint. This frame offset defines the position and orientation of actor B relative to the constraint’s anchor point.

See also

GetConstraintFrameOffsetA()


Sub UseConstraintFrameOffset(constraint_id, flag)

Enables or disables the use of frame offsets in a constraint. When frame offsets are used, the constraint operates relative to specific local frames defined in the two connected actors, rather than directly in the world frame.

Note: Only applies to the hinge and slide constraint.


Function GetHingeAngle(constraint_id)

Returns the angle of a hinge constraint.


Function GetHingeAngleEx(constraint_id, t_matrixA, t_matrixB)

Returns the transforms of the 2 actors in a hinge constraint.


Function GetConstraintBreakingImpulseThreshold(constraint_id)

Returns the breaking impulse threshold for a given constraint. The breaking impulse threshold defines the maximum force (impulse) a constraint can withstand before it “breaks,” meaning that the constraint will be deactivated and no longer enforce its rules.

See also

SetConstraintBreakingImpulseThreshold()


Function GetConstraintAFrame(constraint_id, mA)

Stores the transform of the first actor in a constraint in mA

Note: Only applies to cone and hinge constraints


Function GetConstraintBFrame(constraint_id, mA)

Stores the transform of the second actor in a constraint in mA

Note: Only applies to cone and hinge constraints


Sub SetHingeAxis(constraint_id, x, y, z)

Defines the axis of rotation around which the hinge constraint allows the connected acros to rotate. This function is esential for establishing how the two actors will interact in terms of rotational motion.

The axis of rotation defines the direction in which the hing can rotate. For example, if you want a door to swing open, you would set the axis to be perpendicular to the plane of the door and aligned with the hinge line.


Sub SetConstraintBreakingImpulseThreshold(constraint_id, threshold)

Sets the breaking impulse threshold for a given constraint. The breaking impulse threshold defines the maximum force (impulse) a constraint can withstand before it “breaks,” meaning that the constraint will be deactivated and no longer enforce its rules.

See also

GetConstraintBreakingImpulseThreshold()


Sub setConstraintFrames(constraint_id, frameA_matrix, frameB_matrix)

Defines the reference frames for the constraint. This function establishes how the constraint is oriented in the local coordinate systems of the connected actors. The reference frames define the orientation and position of the constraint relative to each of the connected actors. Each actor can have its own local coordinate system, and the frames help establish how the constraint interacts with the


Sub SetHingeLimit(constraint_id, low, high, softness, bias_factor, relaxation_factor)

Defines the angular limits of the hinge’s rotation. A hinge constraint allows two actors (or one actor and the world) to rotate around a single axis, similar to a door hinge. This function restricts how far this rotation can go by setting minimum and maximum angles.

By default, if no limits are applied, the hinge can rotate freely around the axis.

  • low: This is the minimum angular limit. It defines the smallest angle that the hinge can rotate to in the negative direction.
  • high: This is the maximum angular limit. It defines the largest angle that the hinge can rotate to in the positive direction.
  • softness: Controls how "Soft" the limit is. A value closer to 0 result in a hard limit (instant stop when the limit is reached), while a velue closer to 1 allows some "Give" before the limit fully takes effect, making the motion smoother as the limit is approached.
  • bias_factor: Helps to correct drift or penetration by applying a correction bias when the hinge reaches limit. A higher value will apply a stronger bias to correct errores in the position.
  • relaxation_factor: Controls how the hinge behaves once the limit is reached. A value closer to 1 result in faster relaxation after hitting the limit, while a lower value makes the motion more rigid.

See also

GetHingeLimitBiasFactor(), GetHingeLimitRelaxationFactor(), GetHingeLimitSign(), GetHingeSolveLimit()


Sub SetConeLimit(constraint_id, swingSpan1, swingSpan2, twistSpan, softness, bias_factor, relaxation_factor)

Sets the angular limits for the rotation of the constrained actors. These limits specify how much twisting and swinging is permitted between the two actors connected by the constraint, ensuring the motion stays within a desired range.

Softness: Determines how soft or hard the constraint limits are. A value of 1.0 means the limits are hard, while lower values make the limit softer, allowing some flexibility.

Bias Fector: this parameter defines how quickly the constraint should try to correct errors that bring it near or beyond the limit.

Relaxation Factor: This affects how fast the constraint will "relax" after reaching its limit, allowing it to stabilize after hitting the constraint.

See also

GetConeLimit()


Function GetHingeLimitBiasFactor(constraint_id)

Returns the bias factor associated with the limits of the hinge constraint. This bias factor affects how the constraint corrects errors when the angular position of the constrained actors approaches or exceeds the defined limits.

The bias factor is a parameter that influences how aggressively the constraint corrects the position when the angular motion reaches the limits. A higher bias factor results in a stronger corrective force, helping to pull the constrained bodies back within their limits more quickly.


Function GetHingeLimitRelaxationFactor(constraint_id)

Function GetHingeLimitSign(constraint_id)

Returns the limit sign for the hinge constraint. This value indicates the direction in which the hinge limit is applied, which can be crucial for understanding the behavior of the hinge in relation to its limits.

The limit sign determines whether the hinge's limits are applied in a positive or negative direction. It essentially indicates the side of the limit that is considered "active" during the simulation.

See also

SetHingeLimit()


Function GetHingeSolveLimit(constraint_id)

Checks whether the hinge has reached or exceeded its angular limit during the simulation. It returns a boolean or an integer value that indicates whether the current angular position is within the constraint's angular limits or if corrective forces need to be applied.

The "solve limit" refers to whether the current angular position is close to or outside the defined angular limits. If the constraint detects that the hinge is at the limit, it enters a solving state, where it applies corrective forces to keep the rotation within the allowed range.


Function UseHingeReferenceFrameA(constraint_id, flag)

Allows you to specify which actor's local reference frame is used to determine the hinge’s angular limits and motor direction.

When flag is true the hinge constraint will use actor A's reference frame as the basis for calculating angular limits and motor directions.


Function GetConstraintAppliedImpulse(constraint_id)

Returns the impulse applied to a constraint during the last simulation step. This impulse is the force integrated over a small time step (impulse = force × time) and is applied to resolve the constraint and maintain its behavior, such as keeping two objects connected or restricting movement.


Function GetConstraintFixedActor(constraint_id)

Returns the actor that is associated with a specific constraint. This is primarily applicable in constraints that involve one actor being constrained to another or to a static point in the simulation.


Sub GetPointPivotA(constraint_id, ByRef x, ByRef y, ByRef z)

Gets the pivot point on the first actor (Body A) of the constraint. This pivot point defines the specific location in the local space of Body A where the point-to-point constraint is anchored.


Sub GetPointtPivotB(constraint_id, ByRef x, ByRef y, ByRef z)

Gets the pivot point on the first actor (Body B) of the constraint. This pivot point defines the specific location in the local space of Body B where the point-to-point constraint is anchored.


Function GetConstraintActorA(constraint_id)

Returns the first actor in a constraint.


Function GetConstraintActorB(constraint_id)

Returns the second actor in a constraint.


Function GetConstraintActorB(constraint_id)

Returns the second actor in a constraint.


Sub SetConstraintSolverIterations(constraint_id, num)

Sets the value for the number of solver iterations that have been overridden for a specific constraint or actor. Solver iterations refer to the number of times the physics engine solves for constraint forces during each simulation step.


Function GetConeBiasFactor(constraint_id)

Returns the bias factor used to correct constraint violations (such as small positional or angular errors) during the simulation. The bias factor helps ensure that the constrained actors return to their intended positions or orientations over time by applying corrective forces or impulses.


Function GetConeDamping(constraint_id)

Returns the damping factor applied to the constraint. Damping is used to reduce the amount of oscillation or unwanted movement (such as excessive rotation or swinging) around the constrained actor's axes.


Function GetConeFixThresh(constraint_id)

Returns the fix threshold value associated with that constraint. This threshold is used to control how the constraint behaves when the angle of the rotation between the actors approaches the limits defined by the cone twist constraint.

The fix threshold defines a limit or tolerance for how closely the angle between the two actors can approach the constraint's limits before corrective actions are taken. When the angular motion exceeds this threshold, the constraint applies corrective forces to bring the motion back within the allowed range.


Function GetConeLimit(constraint_id, limit_index)

Returns the angular limit associated with a specific degree of freedom in the cone constraint. This limit defines the range of motion allowed around a given axis (twist, swing1, or swing2) for the constrained actors.

limitIndex is an integer that indicates which limit to retrieve. It typically takes values corresponding to the type of limit:

  • 0: Limit for the twist axis.
  • 1: Limit for the swing1 axis.
  • 2: Limit for the swing2 axis.

Returns value is the maximum angle or range allowed for the specified degree of freedom (twist, swing1, or swing2)


Function GetConstraintLimitSoftness(constraint_id)

Returns the softness parameter associated with the limits of the constraint. This softness affects how the constraint behaves when the angular motion of the connected actors approaches their defined limits.

  • The fix threshold defines a limit or tolerance for how closely the angle between the two actors can approach the constraint's limits before corrective actions are taken. When the angular motion exceeds this threshold, the constraint applies corrective forces to bring the motion back within the allowed range.

Function GetConstraintSolverIterations(constraint_id)

Returns the value for the number of solver iterations that have been overridden for a specific constraint or actor. Solver iterations refer to the number of times the physics engine solves for constraint forces during each simulation step.


Sub GetConeAnglePoint(constraint_id, angle, c_len, ByRef x, ByRef y, ByRef z)

Computes or retrieves a point based on a given angle relative to the constraint’s twist axis.


Function GetConstraintAngularOnly(constraint_id)

Returns true if the hinge constraint is set to limit only angular motion while allowing unrestricted linear (translational) motion.

Note: Applies to Cone and Hinge constraints


Function GetConeSolveSwingLimit(constraint_id)

Returns whether the swing limit of the constraint is currently being enforced during the simulation.

The swing limit defines the boundary within which the connected actors can swing. When the bodies approach or exceed this limit, the physics engine enforces a constraint to prevent further motion. If the swing limit is exceeded during simulation, corrective forces are applied to bring the actors back within the allowed range.


Function GetConeSolveTwistLimit(constraint_id)

Returns whether the twist limit is currently being enforced during the simulation.

The twist limit controls how much the connected actors can rotate around the central axis of the joint (the "twist" axis). When the actors rotate beyond this allowed limit, the physics engine applies corrective forces to keep the rotation within the defined twist range.


Function GetConeSwingSpan1(constraint_id)

Returns the maximum allowed rotation angle (or "span") for the first swing axis. This swing axis is one of the two orthogonal axes around which the constrained actors are allowed to swing, forming a cone-shaped range of motion.

There are two swing spans, swing span 1 and swing span 2, corresponding to the maximum allowable swing angles around each of the two swing axes.


Function GetConeSwingSpan2(constraint_id)

Returns the maximum allowed rotation angle (or "span") for the second swing axis. This swing axis is one of the two orthogonal axes around which the constrained actors are allowed to swing, forming a cone-shaped range of motion.

There are two swing spans, swing span 1 and swing span 2, corresponding to the maximum allowable swing angles around each of the two swing axes.


Function GetConeTwistAngle(constraint_id)

Returns the current twist angle between the two actors connected by the constraint.

  • The twist angle is the current rotational angle between the two actors around the primary twist axis.
  • It represents how much the actors have rotated relative to each other around the axis, which is the same axis that the twist limit is applied to. The twist angle can be compared to the twist limit to determine if the constraint is approaching or exceeding the allowed range of rotation.

Function GetConeTwistLimitSign(constraint_id)

Returns the sign of the twist limit, which indicates the direction of the twist limit enforcement around the twist axis.

  • The twist limit sign determines the direction in which the twist limit is applied.
  • A positive sign typically indicates a counterclockwise rotation is allowed, while a negative sign indicates a clockwise rotation is allowed.

Function GetConeTwistSpan(constraint_id)

Returns the maximum allowed twist angle for the constraint, which determines how far the connected bodies can rotate around the twist axis before the constraint enforces limits.


Sub SetConstraintAngularOnly(constraint_id, flag)

Sets the hinge constraint to limit only angular motion while allowing unrestricted linear (translational) motion.


Sub SetConeDamping(constraint_id, damping)

Returns the damping factor applied to the constraint. Damping is used to reduce the amount of oscillation or unwanted movement (such as excessive rotation or swinging) around the constrained actor's axes.


Sub SetConeFixThresh(constraint_id, fixThresh)

Sets the fix threshold value associated with that constraint. This threshold is used to control how the constraint behaves when the angle of the rotation between the actors approaches the limits defined by the cone twist constraint.

The fix threshold defines a limit or tolerance for how closely the angle between the two actors can approach the constraint's limits before corrective actions are taken. When the angular motion exceeds this threshold, the constraint applies corrective forces to bring the motion back within the allowed range.


Sub GetSlideAnchorA(constraint_id, ByRef x, ByRef y, ByRef z)

Gets the anchor point of the first actor in world space, where the slider constraint is acting on the actor. This point represents the location of the slider's reference frame on body A in the global coordinate system.


Sub GetSlideAnchorB(constraint_id, ByRef x, ByRef y, ByRef z)

Gets the anchor point of the first actor in world space, where the slider constraint is acting on the actor. This point represents the location of the slider's reference frame on body B in the global coordinate system.


Function GetSlideAngDepth(constraint_id)

Gets the angular depth or the angular deviation from the expected orientation of the two actors (or one actor and the world) constrained by the slider. This "angular depth" refers to how much the actors are misaligned rotationally relative to the constraint’s expected or allowed configuration.


Function GetSlideAngularPos(constraint_id)

Gets the current angular position of an actor relative to the other actor (or the world) around the slider's axis of motion. Specifically, it measures how much an actor has rotated around the axis that is defined for the slider constraint.


Function GetSlideDampingDirAng(constraint_id)

Returns the angular directional damping value. This damping factor specifically affects angular motion in the direction of movement along the constraint's axes.

Note: Only applies to slider constraint.


Function GetSlideDampingDirLin(constraint_id)

Returns the linear directional damping value for a constraint. This value applies to the linear (translational) motion of an object along the constraint's axis of movement.

Note: Only applies to slider constraint.


Function GetSlideDampingLimAng(constraint_id)

Returns the angular limit damping factor for a constraint. This damping applies specifically to the angular motion of an object when it reaches the limit of its allowed rotational range.


Function GetSlideDampingLimLin(constraint_id)

Returns the linear limit damping factor for a constraint. This damping applies specifically to the linear (translational) motion of an object when it reaches the limit of its allowed range of movement along a specific axis.

Note: Only applies to slider constraint.


Function GetSlideDampingOrthoAng(constraint_id)

Returns the orthogonal angular damping factor applied to a constraint. This damping affects angular (rotational) motion that occurs perpendicular to the primary axis of movement defined by the constraint.


Function GetSlideDampingOrthoLin(constraint_id)

Returns the orthogonal linear damping factor for a constraint. This damping affects the linear (translational) motion of an object that occurs perpendicular to the primary direction of movement defined by the constraint.

Note: Only applies to slider constraint.


Function GetSlideLinearPos(constraint_id)

Returns the current linear position of the slider constraint along its defined axis. This position reflects how far the connected actors have moved along the slider's linear axis since the constraint was created or last reset.

This value can be positive or negative, depending on the relative positions of the two bodies connected by the slider.

hr class="docutils" />
Function GetSlideLinearPos(constraint_id)

Returns the linear depth of the slider constraint. This value indicates how much the actors connected by the slider constraint are overlapping or penetrating each other in the linear (translational) direction.

The linear depth is a measure of how far the actors are penetrating each other along the linear axis defined by the slider constraint. A positive value indicates that the actors are overlapping, while a value of zero means they are in contact but not penetrating. Negative values typically imply that the actors are separated.


Function GetSlideLowerAngLimit(constraint_id)

Returns the lower angular limit of the constraint. This value specifies the minimum angle allowed for the rotation of the connected actors around the axis perpendicular to the sliding direction defined by the slider constraint.

The lower angular limit indicates the smallest angle that the actors can rotate about the axis perpendicular to the sliding direction. If the rotation tries to exceed this limit, the physics engine will apply corrective forces to maintain the bodies within the allowed range.


Function GetSlideLowerLinLimit(constraint_id)

Returns the lower linear limit for the translational (sliding) motion along the slider's axis. This value specifies the minimum allowable position for the connected actors along the defined axis of the slider constraint.

This defines the minimum translation distance along the slider’s axis that the connected actors are allowed to reach. If the actors' relative position along the axis goes below this limit, the constraint will prevent further movement.


Function GetSlideRestitutionDirAng(constraint_id)

Returns the restitution value for angular motion. The restitution coefficient is a measure of how much energy is conserved in a collision or constraint interaction, specifically for angular movements.

When actors collide or interact, their angular momentum and position can change, and the restitution value governs how much of that energy is retained after the interaction.


Function GetSlideRestitutionDirLin(constraint_id)

Returns the restitution value for linear motion. This value determines how much energy is conserved in a collision or interaction involving linear movements of the connected actors.

When the actors collide or interact, the restitution value dictates how much of their energy is retained after the interaction.


Function GetSlideRestitutionLimAng(constraint_id)

Returns the restitution value for angular limit. This value determines how much energy is conserved when the angular motion of the connected actors reaches the angular limits of the slider constraint. Essentially, it controls how "bouncy" the rotation is when it hits the angular limit of the constraint.

A value of 0.0 means no bounce (perfectly inelastic), while a value of 1.0 allows maximum bounce (perfectly elastic).


Function GetSlideRestitutionLimLin(constraint_id)

Returns the restitution value for the linear limit of the constraint. This value controls how much energy is conserved (or how "bouncy" the interaction is) when the connected actors reach the linear limits of the slider constraint, which restricts the movement along the sliding axis.

Restitution is a measure of how much energy is retained after a collision or interaction. In this context, when the linear movement reaches the limits, restitution controls how much the actors "bounce" back. A restitution value of 0.0 means no bounce (the collision is perfectly inelastic), and 1.0 allows maximum bounce (the collision is perfectly elastic).


Function GetSlideRestitutionOrthoAng(constraint_id)

Returns the restitution value for orthogonal angular motion. This value determines how much energy is conserved (or how "bouncy" the interaction is) when rotational movement occurs in a direction orthogonal (perpendicular) to the slider's primary axis of movement.

Orthogonal Angular Motion: In the context of a slider constraint, orthogonal angular motion refers to rotational movement around axes that are perpendicular to the slider's main movement axis.

Restitution: Restitution is a measure of how much energy is retained in a collision or interaction. A restitution value of 0.0 means no bounce (inelastic collision), and 1.0 means maximum bounce (elastic collision). For orthogonal angular motion, this describes how much bounce occurs after the rotational motion hits the constraints or limits in a perpendicular direction to the slider axis.


Function GetSlideRestitutionOrthoLin(constraint_id)

Returns the restitution value for orthogonal linear motion. This value determines how much energy is conserved (or how "bouncy" the interaction is) when linear motion occurs in a direction orthogonal (perpendicular) to the primary sliding axis of the constraint.

Orthogonal Linear Motion: In the context of a slider constraint, orthogonal linear motion refers to translational movement along axes that are perpendicular to the main sliding axis of the constraint.

Restitution: Restitution is a measure of how much energy is retained or conserved during a collision or interaction. A restitution value of 0.0 indicates no bounce (perfectly inelastic), while 1.0 indicates maximum bounce (perfectly elastic). For orthogonal linear motion, this value describes how much the actors bounce or retain energy when they hit limits or experience movement perpendicular to the slider’s main axis.


Function GetSlideSoftnessDirAng(constraint_id)

Returns the softness parameter for the angular motion of the constraint. This parameter is used to define how "soft" or "rigid" the limits of angular motion are, particularly when the angular limits are reached.

The softness parameter defines how smoothly the constraint responds to limit violations. A higher softness value allows for more gradual movements when limits are approached, while a lower value creates a more rigid response. Softness is particularly useful in simulations to avoid harsh impacts or stiff movements when limits are reached.


Function GetSlideSoftnessDirLin(constraint_id)

Returns the softness parameter for the linear motion of the constraint. This parameter influences how the constraint responds when the linear limits of movement are reached along the sliding axis, determining whether the response is soft and gradual or more rigid.

In the context of constraints, softness defines how "compliant" or "stiff" the constraint behaves when the limits are approached. A higher softness value makes the constraint respond more softly and gradually as the limit is approached, while a lower value makes the response stiffer and more rigid.


Function GetSlideSoftnessLimAng(constraint_id)

Returns the softness parameter for the angular limits of the constraint. This parameter affects how "soft" or "rigid" the constraint behaves when the connected actors reach their angular rotational limits around the slider's axis of rotation.

The softness parameter defines how compliant or stiff the constraint behaves when the motion approaches a limit. A higher softness makes the constraint more flexible, allowing for smoother motion near the limit. A lower softness makes the limit response more rigid and immediate.


Function GetSlideSoftnessLimLin(constraint_id)

Returns the softness parameter for the linear limits of the constraint. This parameter influences how "soft" or "rigid" the constraint behaves when the connected actors reach their linear (sliding) limits along the constraint's axis of motion.

The softness parameter defines how compliant or stiff the constraint behaves when limits are approached. A higher softness value allows for a more gradual and flexible response as the limit is reached, while a lower softness value results in a stiffer and more rigid response.


Function GetSlideSoftnessOrthoAng(constraint_id)

Returns the softness parameter for the orthogonal angular limits of the constraint. This parameter controls how "soft" or "rigid" the constraint behaves when angular rotation is limited along directions orthogonal (perpendicular) to the primary axis of motion.

The softness parameter defines how compliant (soft) or stiff (rigid) the constraint behaves when the bodies approach their angular or linear limits. A higher softness value makes the limit more flexible, allowing for gradual motion, while a lower value makes the limit more rigid and restrictive.


Function GetSlideSoftnessOrthoLin(constraint_id)

Returns the softness parameter for the orthogonal linear limits of the constraint. This parameter affects how "soft" or "rigid" the constraint behaves when the connected actors approach their linear movement limits in directions that are orthogonal (perpendicular) to the primary sliding axis.

The softness parameter determines how rigid or compliant the constraint is when the actors approach their movement limits. A higher softness value allows for smoother, more flexible movement near the limit, while a lower value results in a more rigid, immediate response.


Function GetSlideSolveAngLimit(constraint_id)

Checks whether the angular position of the constraint has reached or exceeded its defined angular limits. It returns a value indicating if the constraint is at or beyond its lower or upper angular limit around the slider’s axis of rotation.


Function GetSlideSolveLinLimit(constraint_id)

Checks whether the linear position of the constraint has reached or exceeded its defined linear limits. It returns a value indicating if the constraint is at or beyond its lower or upper linear limit along the sliding axis.


Function GetSlideUpperAngLimit(constraint_id)

Returns the upper limit of the angular movement allowed for the constraint. This function is crucial for determining how much rotational freedom is allowed around the axis of rotation defined by the slider constraint.

The upper angular limit specifies the maximum allowed rotation around the rotational axis for the slider constraint. If the relative rotation between the two actors exceeds this angle, corrective forces are applied to maintain the constraint and prevent further rotation.


Function GetSlideUpperLinLimit(constraint_id)

Returns the upper limit for linear movement along the constraint's axis. This is a crucial function for controlling how far the connected actors can slide along that axis before the constraint enforces limits.

The upper linear limit specifies the maximum distance that the connected actors can move away from each other along the slider's axis. If the relative movement exceeds this limit, the constraint will apply corrective forces to stop further movement.


Function GetSlideUpperLinLimit(constraint_id)

Returns the upper limit for linear movement along the constraint's axis. This is a crucial function for controlling how far the connected actors can slide along that axis before the constraint enforces limits.

The upper linear limit specifies the maximum distance that the connected actors can move away from each other along the slider's axis. If the relative movement exceeds this limit, the constraint will apply corrective forces to stop further movement.


Function GetSlideUseFrameOffset(constraint_id)

Returns a boolean value indicating whether the constraint is using frame offsets for its linear and angular limits.


Sub SetSlideDampingDirAng(constraint_id, n)

Sets the angular directional damping value. This damping factor specifically affects angular motion in the direction of movement along the constraint's axes.


Sub SetSlideDampingLimAng(constraint_id, n)

Sets the angular limit damping factor for a constraint. This damping applies specifically to the angular motion of an object when it reaches the limit of its allowed rotational range.


Sub SetSlideDampingLimLin(constraint_id, n)

Sets the linear limit damping factor for a constraint. This damping applies specifically to the linear (translational) motion of an object when it reaches the limit of its allowed range of movement along a specific axis.


Sub SetSlideDampingOrthoAng(constraint_id, n)

Sets the orthogonal angular damping factor applied to a constraint. This damping affects angular (rotational) motion that occurs perpendicular to the primary axis of movement defined by the constraint.


Sub SetSlideDampingOrthoLin(constraint_id, n)

Sets the orthogonal linear damping factor for a constraint. This damping affects the linear (translational) motion of an object that occurs perpendicular to the primary direction of movement defined by the constraint.


Sub SetSlideLowerAngLimit(constraint_id, n)

Sets the lower angular limit of the constraint. This value specifies the minimum angle allowed for the rotation of the connected actors around the axis perpendicular to the sliding direction defined by the slider constraint.

The lower angular limit indicates the smallest angle that the actors can rotate about the axis perpendicular to the sliding direction. If the rotation tries to exceed this limit, the physics engine will apply corrective forces to maintain the bodies within the allowed range.


Sub SetSlideLowerLinLimit(constraint_id, n)

Sets the lower linear limit for the translational (sliding) motion along the slider's axis. This value specifies the minimum allowable position for the connected actors along the defined axis of the slider constraint.

This defines the minimum translation distance along the slider’s axis that the connected actors are allowed to reach. If the actors' relative position along the axis goes below this limit, the constraint will prevent further movement.


Sub SetSlideRestitutionDirAng(constraint_id, n)

Sets the restitution value for angular motion. The restitution coefficient is a measure of how much energy is conserved in a collision or constraint interaction, specifically for angular movements.

When actors collide or interact, their angular momentum and position can change, and the restitution value governs how much of that energy is retained after the interaction.


Sub SetSlideRestitutionDirLin(constraint_id, n)

Sets the restitution value for linear motion. This value determines how much energy is conserved in a collision or interaction involving linear movements of the connected actors.

When the actors collide or interact, the restitution value dictates how much of their energy is retained after the interaction.


Sub SetSlideRestitutionLimAng(constraint_id, n)

Sets the restitution value for angular limit. This value determines how much energy is conserved when the angular motion of the connected actors reaches the angular limits of the slider constraint. Essentially, it controls how "bouncy" the rotation is when it hits the angular limit of the constraint.

A value of 0.0 means no bounce (perfectly inelastic), while a value of 1.0 allows maximum bounce (perfectly elastic).


Sub SetSlideRestitutionLimLin(constraint_id, n)

Sets the restitution value for the linear limit of the constraint. This value controls how much energy is conserved (or how "bouncy" the interaction is) when the connected actors reach the linear limits of the slider constraint, which restricts the movement along the sliding axis.

Restitution is a measure of how much energy is retained after a collision or interaction. In this context, when the linear movement reaches the limits, restitution controls how much the actors "bounce" back. A restitution value of 0.0 means no bounce (the collision is perfectly inelastic), and 1.0 allows maximum bounce (the collision is perfectly elastic).


Sub SetSlideRestitutionOrthoAng(constraint_id, n)

Sets the restitution value for orthogonal angular motion. This value determines how much energy is conserved (or how "bouncy" the interaction is) when rotational movement occurs in a direction orthogonal (perpendicular) to the slider's primary axis of movement.

Orthogonal Angular Motion: In the context of a slider constraint, orthogonal angular motion refers to rotational movement around axes that are perpendicular to the slider's main movement axis.

Restitution: Restitution is a measure of how much energy is retained in a collision or interaction. A restitution value of 0.0 means no bounce (inelastic collision), and 1.0 means maximum bounce (elastic collision). For orthogonal angular motion, this describes how much bounce occurs after the rotational motion hits the constraints or limits in a perpendicular direction to the slider axis.


Sub SetSlideRestitutionOrthoLin(constraint_id, n)

Sets the restitution value for orthogonal linear motion. This value determines how much energy is conserved (or how "bouncy" the interaction is) when linear motion occurs in a direction orthogonal (perpendicular) to the primary sliding axis of the constraint.

Orthogonal Linear Motion: In the context of a slider constraint, orthogonal linear motion refers to translational movement along axes that are perpendicular to the main sliding axis of the constraint.

Restitution: Restitution is a measure of how much energy is retained or conserved during a collision or interaction. A restitution value of 0.0 indicates no bounce (perfectly inelastic), while 1.0 indicates maximum bounce (perfectly elastic). For orthogonal linear motion, this value describes how much the actors bounce or retain energy when they hit limits or experience movement perpendicular to the slider’s main axis.


Sub SetSlideSoftnessDirAng(constraint_id, n)

Sets the softness parameter for the angular motion of the constraint. This parameter is used to define how "soft" or "rigid" the limits of angular motion are, particularly when the angular limits are reached.

The softness parameter defines how smoothly the constraint responds to limit violations. A higher softness value allows for more gradual movements when limits are approached, while a lower value creates a more rigid response. Softness is particularly useful in simulations to avoid harsh impacts or stiff movements when limits are reached.


Sub SetConstraintSoftnessDirLin(constraint_id, n)

Sets the softness parameter for the linear motion of the constraint. This parameter influences how the constraint responds when the linear limits of movement are reached along the sliding axis, determining whether the response is soft and gradual or more rigid.

In the context of constraints, softness defines how "compliant" or "stiff" the constraint behaves when the limits are approached. A higher softness value makes the constraint respond more softly and gradually as the limit is approached, while a lower value makes the response stiffer and more rigid.


Sub SetSlideSoftnessLimAng(constraint_id, n)

Sets the softness parameter for the angular limits of the constraint. This parameter affects how "soft" or "rigid" the constraint behaves when the connected actors reach their angular rotational limits around the slider's axis of rotation.

The softness parameter defines how compliant or stiff the constraint behaves when the motion approaches a limit. A higher softness makes the constraint more flexible, allowing for smoother motion near the limit. A lower softness makes the limit response more rigid and immediate.


Sub SetSlideSoftnessLimLin(constraint_id, n)

Sets the softness parameter for the linear limits of the constraint. This parameter influences how "soft" or "rigid" the constraint behaves when the connected actors reach their linear (sliding) limits along the constraint's axis of motion.

The softness parameter defines how compliant or stiff the constraint behaves when limits are approached. A higher softness value allows for a more gradual and flexible response as the limit is reached, while a lower softness value results in a stiffer and more rigid response.


Sub SetSlideSoftnessOrthoAng(constraint_id, n)

Sets the softness parameter for the orthogonal angular limits of the constraint. This parameter controls how "soft" or "rigid" the constraint behaves when angular rotation is limited along directions orthogonal (perpendicular) to the primary axis of motion.

The softness parameter defines how compliant (soft) or stiff (rigid) the constraint behaves when the bodies approach their angular or linear limits. A higher softness value makes the limit more flexible, allowing for gradual motion, while a lower value makes the limit more rigid and restrictive.


Sub SetSlideSoftnessOrthoLin(constraint_id, n)

Sets the softness parameter for the orthogonal linear limits of the constraint. This parameter affects how "soft" or "rigid" the constraint behaves when the connected actors approach their linear movement limits in directions that are orthogonal (perpendicular) to the primary sliding axis.

The softness parameter determines how rigid or compliant the constraint is when the actors approach their movement limits. A higher softness value allows for smoother, more flexible movement near the limit, while a lower value results in a more rigid, immediate response.


Sub SetSlideUpperAngLimit(constraint_id, n)

Sets the upper limit of the angular movement allowed for the constraint. This function is crucial for determining how much rotational freedom is allowed around the axis of rotation defined by the slider constraint.

The upper angular limit specifies the maximum allowed rotation around the rotational axis for the slider constraint. If the relative rotation between the two actors exceeds this angle, corrective forces are applied to maintain the constraint and prevent further rotation.


Sub SetSlideUpperLinLimit(constraint_id, n)

Sets the upper limit for linear movement along the constraint's axis. This is a crucial function for controlling how far the connected actors can slide along that axis before the constraint enforces limits.

The upper linear limit specifies the maximum distance that the connected actors can move away from each other along the slider's axis. If the relative movement exceeds this limit, the constraint will apply corrective forces to stop further movement.


Function ConstraintExists(constraint_id)

Returns true if the id passed is a valid constraint.