UNPKG

@babylonjs/core

Version:

Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.

38 lines (37 loc) 1.26 kB
import type { Nullable } from "../../types"; import type { Observer } from "../../Misc/observable"; import type { Vector3 } from "../../Maths/math.vector"; import type { Node } from "../../node"; import type { PhysicsBody } from "./physicsBody"; import "../joinedPhysicsEngineComponent"; declare module "../../Meshes/transformNode" { /** * */ /** @internal */ interface TransformNode { /** @internal */ _physicsBody: Nullable<PhysicsBody>; /** * @see */ physicsBody: Nullable<PhysicsBody>; /** * */ getPhysicsBody(): Nullable<PhysicsBody>; /** Apply a physic impulse to the mesh * @param force defines the force to apply * @param contactPoint defines where to apply the force * @returns the current mesh */ applyImpulse(force: Vector3, contactPoint: Vector3): TransformNode; /** Apply a physic angular impulse to the mesh * @param angularImpulse defines the torque to apply * @returns the current mesh */ applyAngularImpulse(angularImpulse: Vector3): TransformNode; /** @internal */ _disposePhysicsObserver: Nullable<Observer<Node>>; } }