playcanvas
Version:
Open-source WebGL/WebGPU 3D engine for the web
26 lines (25 loc) • 921 B
TypeScript
/**
* Creates a trigger object used to create internal physics objects that interact with rigid bodies
* and trigger collision events with no collision response.
*/
export class Trigger {
/**
* Create a new Trigger instance.
*
* @param {AppBase} app - The running {@link AppBase}.
* @param {CollisionComponent} component - The component for which the trigger will be created.
*/
constructor(app: AppBase, component: CollisionComponent);
entity: import("../../entity.js").Entity;
component: CollisionComponent;
app: AppBase;
initialize(): void;
body: import("../../physics/physics-body.js").PhysicsBody;
destroy(): void;
_getEntityTransform(position: any, rotation: any): void;
updateTransform(): void;
enable(): void;
disable(): void;
}
import type { CollisionComponent } from './component.js';
import type { AppBase } from '../../app-base.js';