Physics.P2#clearTilemapLayerBodies()

clearTilemapLayerBodies(map, layer)

Clears all physics bodies from the given TilemapLayer that were created with World.convertTilemap.

Parameters
Name Type Argument Description
map Phaser.Tilemap

The Tilemap to get the map data from.

layer number | string | Phaser.TilemapLayer <optional>

The layer to operate on. If not given will default to map.currentLayer.

Source code: physics/p2/World.js (Line 1666)
doc_phaser
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.