Interface for a 6-degree-of-freedom joint in the physics system.

物理系统中6自由度关节的接口。

interface ID6Joint {
    destroy(): void;
    getAngularForce(): Vector3;
    getlinearForce(): Vector3;
    getSwingYAngle(): number;
    getSwingZAngle(): number;
    getTwistAngle(): number;
    isCollision(value: boolean): void;
    isEnable(value: boolean): void;
    isValid(): boolean;
    setAxis(axis: Vector3, secendary: Vector3): void;
    setBreakForce(value: number): void;
    setBreakTorque(value: number): void;
    setCollider(owner: ICollider): void;
    setConnectedCollider(owner: ICollider): void;
    setConnectedInertiaScale(value: number): void;
    setConnectedMassScale(value: number): void;
    setConnectLocalPos(pos: Vector3): void;
    setDistanceLimit(limit: number, bounciness: number, bounceThreshold: number, spring: number, damp: number): void;
    setDrive(index: D6Drive, stiffness: number, damping: number, forceLimit: number): void;
    setDriveTransform(position: Vector3, rotate: Quaternion): void;
    setDriveVelocity(position: Vector3, angular: Vector3): void;
    setInertiaScale(value: number): void;
    setLinearLimit(linearAxis: D6MotionType, upper: number, lower: number, bounciness: number, bounceThreshold: number, spring: number, damping: number): void;
    setLocalPos(pos: Vector3): void;
    setMassScale(value: number): void;
    setMotion(axis: D6Axis, motionType: D6MotionType): void;
    setOwner(value: Node): void;
    setSwingLimit(yAngle: number, zAngle: number, bounciness: number, bounceThreshold: number, spring: number, damping: number): void;
    setTwistLimit(upper: number, lower: number, bounciness: number, bounceThreshold: number, spring: number, damping: number): void;
}

层级 (查看完整内容)

实现于

方法

  • 参数

    • limit: number

      The distance limit.

    • bounciness: number

      The bounciness of the limit.

    • bounceThreshold: number

      The bounce threshold.

    • spring: number

      The spring coefficient.

    • damp: number

      The damping coefficient.

    返回 void

    Set Distance limit Params

    设置关节的距离限制参数。

  • 参数

    • index: D6Drive

      The drive type to set.

    • stiffness: number

      The stiffness of the drive.

    • damping: number

      The damping of the drive.

    • forceLimit: number

      The force limit of the drive.

    返回 void

    Set the drive parameters for a specific drive type.

    设置特定驱动类型的驱动参数。

  • 参数

    • linearAxis: D6MotionType

      The axis to set the limit for.

    • upper: number

      The upper limit.

    • lower: number

      The lower limit.

    • bounciness: number

      The bounciness of the limit.

    • bounceThreshold: number

      The bounce threshold.

    • spring: number

      The spring coefficient.

    • damping: number

      The damping coefficient.

    返回 void

    x,y,z linear Limit.

    设置x,y,z轴的线性限制。

  • 参数

    • yAngle: number

      The angle limit around the Y axis.

    • zAngle: number

      The angle limit around the Z axis.

    • bounciness: number

      The bounciness of the limit.

    • bounceThreshold: number

      The bounce threshold.

    • spring: number

      The spring coefficient.

    • damping: number

      The damping coefficient.

    返回 void

    Set the cone-like swing limit for the joint.

    设置关节的锥形摆动限制。

  • 参数

    • upper: number

      The upper limit of the twist.

    • lower: number

      The lower limit of the twist.

    • bounciness: number

      The bounciness of the limit.

    • bounceThreshold: number

      The bounce threshold.

    • spring: number

      The spring coefficient.

    • damping: number

      The damping coefficient.

    返回 void

    The twist limit controls the range of motion around the twist axis.

    扭转限制控制绕扭转轴的运动范围。