PhysicsHelper

A helper for physics simulations

see

https://doc.babylonjs.com/how_to/using_the_physics_engine

Hierarchy

  • PhysicsHelper

Index

Constructors

constructor

Find examples in Playground
  • Initializes the Physics helper

    Parameters

    • scene: Scene

      Babylon.js scene

    Returns PhysicsHelper

Methods

applyRadialExplosionForce

Find examples in Playground
  • Applies a radial explosion force

    Parameters

    • origin: Vector3

      the origin of the explosion

    • radius: number

      the explosion radius

    • strength: number

      the explosion strength

    • Optional falloff: PhysicsRadialImpulseFalloff

      possible options: Constant & Linear. Defaults to Constant

    Returns Nullable<PhysicsRadialExplosionEvent>

    A physics radial explosion event, or null

applyRadialExplosionImpulse

Find examples in Playground
  • Applies a radial explosion impulse

    Parameters

    • origin: Vector3

      the origin of the explosion

    • radius: number

      the explosion radius

    • strength: number

      the explosion strength

    • Optional falloff: PhysicsRadialImpulseFalloff

      possible options: Constant & Linear. Defaults to Constant

    Returns Nullable<PhysicsRadialExplosionEvent>

    A physics radial explosion event, or null

gravitationalField

Find examples in Playground
  • Creates a gravitational field

    Parameters

    • origin: Vector3

      the origin of the explosion

    • radius: number

      the explosion radius

    • strength: number

      the explosion strength

    • Optional falloff: PhysicsRadialImpulseFalloff

      possible options: Constant & Linear. Defaults to Constant

    Returns Nullable<PhysicsGravitationalFieldEvent>

    A physics gravitational field event, or null

updraft

Find examples in Playground
  • Creates a physics updraft event

    Parameters

    • origin: Vector3

      the origin of the updraft

    • radius: number

      the radius of the updraft

    • strength: number

      the strength of the updraft

    • height: number

      the height of the updraft

    • Optional updraftMode: PhysicsUpdraftMode

      possible options: Center & Perpendicular. Defaults to Center

    Returns Nullable<PhysicsUpdraftEvent>

    A physics updraft event, or null

vortex

Find examples in Playground
  • Creates a physics vortex event

    Parameters

    • origin: Vector3

      the of the vortex

    • radius: number

      the radius of the vortex

    • strength: number

      the strength of the vortex

    • height: number

      the height of the vortex

    Returns Nullable<PhysicsVortexEvent>

    a Physics vortex event, or null A physics vortex event or null

Generated using TypeDoc