Interface of physics dynamic collider.

物理动态碰撞器的接口。

interface IDynamicCollider {
    active: boolean;
    component: PhysicsColliderComponent;
    inPhysicUpdateListIndex: number;
    owner: Node;
    addForce(
        force: Vector3,
        mode: PhysicsForceMode,
        localOffset: Vector3,
    ): void;
    addTorque(torque: Vector3, mode: PhysicsForceMode): void;
    destroy(): void;
    getAngularVelocity(): Vector3;
    getCapable(value: number): boolean;
    getLinearVelocity(): Vector3;
    setAngularDamping(value: number): void;
    setAngularVelocity(value: Vector3): void;
    setBounceCombine(value: PhysicsCombineMode): void;
    setBounciness(value: number): void;
    setCanCollideWith(value: number): void;
    setCenterOfMass(value: Vector3): void;
    setColliderShape(shape: IColliderShape): void;
    setCollisionDetectionMode(value: number): void;
    setCollisionGroup(value: number): void;
    setConstraints(linearFactor: Vector3, angularFactor: Vector3): void;
    setDynamicFriction(value: number): void;
    setEventFilter(events: string[]): void;
    setfriction(value: number): void;
    setFrictionCombine(value: PhysicsCombineMode): void;
    setInertiaTensor(value: Vector3): void;
    setIsKinematic(value: boolean): void;
    setLinearDamping(value: number): void;
    setLinearVelocity(value: Vector3): void;
    setMass(value: number): void;
    setOwner(node: Node): void;
    setRollingFriction(value: number): void;
    setSleepThreshold(value: number): void;
    setStaticFriction(value: number): void;
    setTrigger(value: boolean): void;
    setWorldPosition(value: Vector3): void;
    setWorldRotation(value: Quaternion): void;
    sleep(): void;
    transformChanged(flag: number): void;
    wakeUp(): void;
}

层级 (查看层级一览)

实现于

属性

active: boolean

Indicates whether the collider can be enabled. It's true only when placed in the scene and the physics component is effective.

是否可以启用,只有放入scene中且物理组件生效才会为true。

The physics collider component associated with this collider.

与此碰撞器关联的物理碰撞器组件。

inPhysicUpdateListIndex: number

Index in the physics update list.

在物理更新列表中的索引。

owner: Node

The owner node of the collider.

碰撞器所属的节点。

方法

  • 参数

    • value: number

      Energy below which an actor may go to sleep.

    返回 void

    Sets the mass-normalized kinetic energy threshold below which an actor may go to sleep.

    设置物体可能进入睡眠状态的质量归一化动能阈值。