Physics.HingeConstraint
ClassConstraints translation and a single axis of rotation.
- Available on all platforms
Since Lens Scripting v164
Constraints translation and a single axis of rotation. See also: ConstraintComponent.
Index
Example
// Create a constraint on an object
var hingeConstraint = hingeObj.createComponent(ConstraintComponent.getTypeName());
// Set up options on that constraint
hingeConstraint.debugDrawEnabled = true;
hingeConstraint.constraint = Physics.Constraint.create(Physics.ConstraintType.Hinge);
Extends
Properties
constraintType
readonlyconstraintType:ConstraintType
The type of constraint that is applied.
Since
Lens Scripting Version 164
Inherited from
limitSettings
limitSettings:
HingeLimitSettings
Settings limiting the behaviour of hinge constraint in respect to the applied forces.
Since
Lens Scripting Version 164
motorSettings
motorSettings:
HingeMotorSettings
Settings describing the independent force (motor) applied to the constraint.
Since
Lens Scripting Version 164
Methods
create()
staticcreate(type):Constraint
Create a constraint of the given type, with default settings.
Parameters
| Parameter | Type |
|---|---|
type | ConstraintType |
Returns
Since
Lens Scripting Version 164
Inherited from
getTypeName()
staticgetTypeName():TypeName<HingeConstraint>
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<HingeConstraint>
Since
Lens Scripting Version 164
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean