SliderJoint3D

Package: Libraries.Game.Physics.Joints · Inherits from: Libraries.Game.Physics.Joints.Joint3D, Libraries.Language.Object, Libraries.Game.Physics.PhysicsBehavior3D

This class defines a slider joint.

Variables

  • number SLIDER_CONSTRAINT_DEF_RESTITUTION
  • number SLIDER_CONSTRAINT_DEF_DAMPING
  • number SLIDER_CONSTRAINT_DEF_SOFTNESS

Actions

BuildJacobian()

This action is called by the Collision Solver to gather information on the joint before calling the SolveJoint action. This action is used internally.

ConfigureLinearMotor(boolean enabled, number targetVelocity, number maxForce)

This action configures the linear motor for this slider joint. The motor applies a force along the slider axis to achieve a target velocity.

Parameters

  • enabled boolean: Whether to enable the linear motor
  • targetVelocity number: The desired velocity along the slider axis
  • maxForce number: The maximum force the motor can apply

Initialize(Libraries.Interface.Item3D itemA, Libraries.Interface.Item3D itemB, Libraries.Game.Collision.PhysicsPosition3D positionA, Libraries.Game.Collision.PhysicsPosition3D positionB, boolean useLinearReferenceFrameA)

This action initializes where the slider joint is and what items are associated with the slider joint.

Parameters

  • itemA Libraries.Interface.Item3D: The first item.
  • itemB Libraries.Interface.Item3D: The second item.
  • positionA Libraries.Game.Collision.PhysicsPosition3D: The orientation and location of the slider joint relative to itemA's coordinate system. Make sure so that the x-axis of the slider joint's orientation is pointing toward the direction of the slide relative to ItemA's frame if useLinearReferenceFrameA is set to true.
  • positionB Libraries.Game.Collision.PhysicsPosition3D: The orientation and location of the slider joint relative to itemB's coordinate system.
  • useLinearReferenceFrameA boolean: This is set to true when you want to define the limits from the point of view of the first object's center and orientation.

SetLowerAngularLimit(number lowerLimit)

This action sets how much the moving object should be able to rotate along the axis of slide.

Parameters

  • lowerLimit number

SetLowerLinearLimit(number lowerLimit)

This action sets the lower linear limit to how much the moving object should be able to slide.

Parameters

  • lowerLimit number

SetUpperAngularLimit(number upperLimit)

This action sets how much the moving object should be able to rotate along the axis of slide.

Parameters

  • upperLimit number

SetUpperLinearLimit(number upperLimit)

This action sets the upper linear limit to how much the moving object should be able to slide.

Parameters

  • upperLimit number

SolveJoint(number timeStep)

This action solves the constraint of this joint and make sure that objects A and B is able to move accordint to the joint constraint applied. This action is used internally.

Parameters

  • timeStep number

Inherited Actions

24 actions from Libraries.Game.Physics.Joints.Joint3D
10 actions from Libraries.Game.Physics.PhysicsBehavior3D
3 actions from Libraries.Language.Object