Libraries.Game.Physics.Joints.RotationalLimitMotor3D Documentation

This class stores information of how much a 3D joint (in the form of a motor) can rotate.

Inherits from: Libraries.Language.Object

Summary

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns a CompareResult.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetBounce()This action returns a number that tells you how quick the motor will stop oscillating once that motor has reached its desired position.
GetCurrentLimit()This action returns the state of the motor's angle right now.
GetCurrentLimitError()This action tells you how much over or under the current angle that the motor is in right now to the correct range of the motor's angles.
GetERP()This action returns the error tolerance factor when joint is at its angular limit.
GetEnableMotor()This action tells you whether the motor is allowed to turn or not.
GetHashCode()This action gets the hash code for an object.
GetHiLimit()This action returns the highest angle that this motor can rotate to.
GetLimitSoftness()This action returns a number that tells you how quick you would like to correct your motor's speed if there is a speed change.
GetLoLimit()This action returns the lowest angle that this motor can rotate to.
GetMaxMotorForce()This action returns what is the maximum force that this motor will exhibit on an object attached to this motor.
GetTargetVelocity()This action returns the velocity that you want the motor to go.
IsLimited()This action lets you know if you have set a limit or not.
NeedApplyTorques()This action lets you know if you need to apply torque to any of the objects associated with this RotationalLimitMotor3D.
Set(Libraries.Game.Physics.Joints.RotationalLimitMotor3D other)This action sets the values of this RotationalLimitMotor3D using another RotationalLimitMotor3D.
SetAccumulatedImpulse(number x)This action sets the amount of impulse that you have applied so far.
SetHiLimit(number limit)This action sets the highest angle that this motor can rotate to.
SetLoLimit(number limit)This action sets the lowest angle that this motor can rotate to.
SolveAngularLimits(number timeStep, Libraries.Compute.Vector3 axis, number jacDiagABInv, Libraries.Interface.Item3D body0, Libraries.Interface.Item3D body1)This action makes sure that the angular limits of the motors are met.
TestLimitValue(number testValue)This action lets you know if a testValue that you passed in is within the limits of this RotationalLimitMotor3D.

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns a CompareResult. The compare result is either larger if this hash code is larger than the object passed as a parameter, smaller, or equal.

Example Code

use Libraries.Language.Support.CompareResult
        Object o
        Object t
        CompareResult result = o:Compare(t)

Parameters

Return

Libraries.Language.Support.CompareResult: The Compare result, Smaller, Equal, or Larger.

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Example Code

use Libraries.Language.Object
        use Libraries.Language.Types.Text
        Object o
        Text t
        boolean result = o:Equals(t)

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

GetBounce()

This action returns a number that tells you how quick the motor will stop oscillating once that motor has reached its desired position. Having a higher number means there will be more oscillation.

Return

number: how quick the motor will stop oscillating.

GetCurrentLimit()

This action returns the state of the motor's angle right now. 0 means that the motor's angle is in range or that there wasn't a limit set in the first place. 1 means that the motor's angle is lower than its lowest limit. 2 means that the motor's angle is higher than its highest limit.

Return

integer: the state of the motor's angle.

GetCurrentLimitError()

This action tells you how much over or under the current angle that the motor is in right now to the correct range of the motor's angles.

Return

number: how much over or under the current angle that the motor is in right now to the correct range.

GetERP()

This action returns the error tolerance factor when joint is at its angular limit. When this ERP gets closer to 1, that means you will not allow the motor to have any angle that is outside the limit range. When this ERP gets closer to 0 that means you will ignore all of the errors.

Return

number: the error tolerance factor when joint is at its angular limit.

GetEnableMotor()

This action tells you whether the motor is allowed to turn or not.

Return

boolean: 0 if motor won't turn, 1 if the motor will turn.

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode()

Return

integer: The integer hash code of the object.

GetHiLimit()

This action returns the highest angle that this motor can rotate to.

Return

number: the highest angle that this motor can rotate to.

GetLimitSoftness()

This action returns a number that tells you how quick you would like to correct your motor's speed if there is a speed change. When this number gets closer to 1 that means you would want the motor's speed to go as quickly as possible to the desired speed. When this number gets closer to 0 that means you will ignore the motor's speed error.

Return

number: how quick you would like to correct your motor's speed if there is a speed change.

GetLoLimit()

This action returns the lowest angle that this motor can rotate to.

Return

number: the lowest angle that this motor can rotate to.

GetMaxMotorForce()

This action returns what is the maximum force that this motor will exhibit on an object attached to this motor.

Return

number: the maximum force that this motor will exhibit on an object.

GetTargetVelocity()

This action returns the velocity that you want the motor to go.

Return

number: the velocity that you want the motor to go.

IsLimited()

This action lets you know if you have set a limit or not.

Return

boolean: 0 if you have not set a limit, 1 if you have set a limit.

NeedApplyTorques()

This action lets you know if you need to apply torque to any of the objects associated with this RotationalLimitMotor3D.

Return

boolean: 0 if this motor is not enabled so there will be no torque from this motor, 1 when there will be torque from this motor.

Set(Libraries.Game.Physics.Joints.RotationalLimitMotor3D other)

This action sets the values of this RotationalLimitMotor3D using another RotationalLimitMotor3D.

Parameters

SetAccumulatedImpulse(number x)

This action sets the amount of impulse that you have applied so far.

Parameters

SetHiLimit(number limit)

This action sets the highest angle that this motor can rotate to.

Parameters

SetLoLimit(number limit)

This action sets the lowest angle that this motor can rotate to.

Parameters

SolveAngularLimits(number timeStep, Libraries.Compute.Vector3 axis, number jacDiagABInv, Libraries.Interface.Item3D body0, Libraries.Interface.Item3D body1)

This action makes sure that the angular limits of the motors are met.

Parameters

Return

number: the impulse that should be applied.

TestLimitValue(number testValue)

This action lets you know if a testValue that you passed in is within the limits of this RotationalLimitMotor3D.

Parameters

Return

integer: 0 if the limits aren't set in the first place or test value is within limit, 1 if test value is lower than the lowest limit, 2 if the test value is higher than the highest limit.