Lens Scripting API
    Preparing search index...

    Enumeration HingeMotorType

    Enum that defines motor type.

    //@input Physics.ConstraintComponent constraintComponent

    let constraint = script.constraintComponent.constraint;

    let motorSettings = constraint.motorSettings;
    motorSettings.enabled = true;
    motorSettings.maxImpulse = 10;
    motorSettings.targetType = HingeMotorType.AngleTarget;
    motorSettings.targetValue = Math.PI/2;
    motorSettings = motorSettings;
    Index

    Enumeration Members

    Enumeration Members

    AngleTarget: number

    A motor that attempts to rotate to or hold a specific angle or position along the hinge axis.

    VelocityTarget: number

    A motor that applies torque to reach or maintain a target speed (angular velocity).

    MMNEPVFCICPMFPCPTTAAATR