IPhysicsEnabledObject

Interface for a physics-enabled object

see

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

Hierarchy

  • IPhysicsEnabledObject

Index

Properties

Optional parent

Find examples in Playground
parent: any

The parent of the physics-enabled object

position

Find examples in Playground
position: Vector3

The position of the physics-enabled object

Optional rotation

Find examples in Playground
rotation: Vector3

The rotation of the physics-enabled object

rotationQuaternion

Find examples in Playground
rotationQuaternion: Nullable<Quaternion>

The rotation of the physics-enabled object

scaling

Find examples in Playground
scaling: Vector3

The scale of the physics-enabled object

Methods

computeWorldMatrix

Find examples in Playground
  • computeWorldMatrix(force: boolean): Matrix
  • Computes the world matrix

    Parameters

    • force: boolean

      Specifies if the world matrix should be computed by force

    Returns Matrix

    A world matrix

getAbsolutePivotPoint

Find examples in Playground
  • Gets the absolute pivot point from the mesh

    Returns Vector3

    the absolute pivot point

getAbsolutePosition

Find examples in Playground
  • Gets the absolute position from the mesh

    Returns Vector3

    the absolute position

getBoundingInfo

Find examples in Playground
  • The bounding info of the physics-enabled object

    Returns BoundingInfo

    The bounding info of the physics-enabled object

Optional getChildMeshes

Find examples in Playground
  • getChildMeshes(directDescendantsOnly?: boolean): Array<AbstractMesh>
  • Gets the child meshes

    Parameters

    • Optional directDescendantsOnly: boolean

      Specifies if only direct-descendants should be obtained

    Returns Array<AbstractMesh>

    An array of abstract meshes

getClassName

Find examples in Playground
  • getClassName(): string
  • Gets the class name of the mesh

    Returns string

    The class name

Optional getIndices

Find examples in Playground

Optional getScene

Find examples in Playground
  • Gets the scene from the mesh

    Returns Scene

    the indices array or null

getVerticesData

Find examples in Playground
  • getVerticesData(kind: string): Nullable<Array<number> | Float32Array>
  • Gets the vertex data

    Parameters

    • kind: string

      The type of vertex data

    Returns Nullable<Array<number> | Float32Array>

    A nullable array of numbers, or a float32 array

Optional getWorldMatrix

Find examples in Playground
  • Gets the world matrix

    Returns Matrix

    A world matrix

rotate

Find examples in Playground
  • Rotates the mesh

    Parameters

    • axis: Vector3

      The axis of rotation

    • amount: number

      The amount of rotation

    • Optional space: Space

      The space of the rotation

    Returns TransformNode

    The rotation transform node

setAbsolutePosition

Find examples in Playground
  • Sets the absolute position of the mesh

    Parameters

    • absolutePosition: Vector3

      The absolute position of the mesh

    Returns TransformNode

    The transform node

translate

Find examples in Playground
  • Translates the mesh

    Parameters

    • axis: Vector3

      The axis of translation

    • distance: number

      The distance of translation

    • Optional space: Space

      The space of the translation

    Returns TransformNode

    The transform node

Generated using TypeDoc