Interface IPhysicsEnabledObject
Hierarchy
- IPhysicsEnabledObject
Index
Properties
Optional parentSearch playground for parent
The parent of the physics-enabled object
positionSearch playground for position
The position of the physics-enabled object
Optional rotationSearch playground for rotation
The rotation of the physics-enabled object
rotation QuaternionSearch playground for rotationQuaternion
The rotation of the physics-enabled object
scalingSearch playground for scaling
The scale of the physics-enabled object
Methods
compute World MatrixSearch playground for computeWorldMatrix
Computes the world matrix
Parameters
force: boolean
Specifies if the world matrix should be computed by force
Returns Matrix
A world matrix
get Absolute Pivot PointSearch playground for getAbsolutePivotPoint
Gets the absolute pivot point from the mesh
Returns Vector3
the absolute pivot point
get Absolute PositionSearch playground for getAbsolutePosition
Gets the absolute position from the mesh
Returns Vector3
the absolute position
get Bounding InfoSearch playground for getBoundingInfo
The bounding info of the physics-enabled object
Returns BoundingInfo
The bounding info of the physics-enabled object
Optional get Child MeshesSearch playground for getChildMeshes
Gets the child meshes
Parameters
Optional directDescendantsOnly: boolean
Specifies if only direct-descendants should be obtained
Returns AbstractMesh[]
An array of abstract meshes
get Class NameSearch playground for getClassName
Gets the class name of the mesh
Returns string
The class name
Optional get IndicesSearch playground for getIndices
Gets the indices from the mesh
Returns Nullable<IndicesArray>
A nullable array of index arrays
Optional get SceneSearch playground for getScene
Gets the scene from the mesh
Returns Scene
the indices array or null
get Vertices DataSearch playground for getVerticesData
Gets the vertex data
Parameters
kind: string
The type of vertex data
Returns Nullable<number[] | Float32Array>
A nullable array of numbers, or a float32 array
Optional get World MatrixSearch playground for getWorldMatrix
Gets the world matrix
Returns Matrix
A world matrix
rotateSearch playground for rotate
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
set Absolute PositionSearch playground for setAbsolutePosition
Sets the absolute position of the mesh
Parameters
absolutePosition: Vector3
The absolute position of the mesh
Returns TransformNode
The transform node
translateSearch playground for translate
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
Interface for a physics-enabled object
https://doc.babylonjs.com/how_to/using_the_physics_engine