API for interacting with MatterBodyTiles created from convertTilemapLayer #5912
ygongdev
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have not found a good way to access and customize
MatterBodyTiles
that are added into the matter world fromconvertTilemapLayer
. Please let me know if there is an existing alternative.An easy solution seems to just return the new array of
MatterBodyTiles
instead of the matter world itself. https://github.com/photonstorm/phaser/blob/v3.50.0/src/physics/matter-js/World.js#L975A more robust solution might involve creating a
tilemapLayer
equivalent abstraction formatterBodyTiles
?This could be useful for customizing tilemaps in the matter world. For example, customizing each tile as a sensor to detect collisions, but not actually colliding with other objects.
Right now I do this to get all the
matterTileBodies
.More than happy to help with a PR for the easy solution, if the idea is acceptable.
Beta Was this translation helpful? Give feedback.
All reactions