Used to show the physics impostor around the specific mesh
Clean up physics debug display
BodySearch playground for hideBody
Hides a body from the physics engine.
The body to hide.
This function is useful for hiding a body from the physics engine. It removes the body from the utility layer scene and disposes the mesh associated with it. It also unregisters the render function if the number of bodies is 0. This is useful for hiding a body from the physics engine without deleting it.
ConstraintSearch playground for hideConstraint
ImpostorSearch playground for hideImpostor
Hides an impostor from the scene.
The impostor to hide.
This method is useful for hiding an impostor from the scene. It removes the impostor from the utility layer scene, disposes the mesh, and removes the impostor from the list of impostors. If the impostor is the last one in the list, it also unregisters the render function.
InertiaSearch playground for hideInertia
BodySearch playground for showBody
Shows a debug mesh for a given physics body.
The physics body to show.
The debug mesh, or null if the body is already shown.
This function is useful for visualizing the physics body in the scene. It creates a debug mesh for the given body and adds it to the scene. It also registers a before render function to update the debug mesh position and rotation.