englercj / phaser-tiled

A tilemap implementation for phaser focusing on large complex maps built with the Tiled Editor.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to use simple Arcade Physics collision instead of P2?

opened this issue · comments

I have a layer called 'Collision' and I paint all boxes red for their collision.

As I am looking over the code here, it seems like convertTiledmap is the only supported method, but this creates p2 bodies.

With Phaser's tile renderer there is a method
map.setCollisionBetween(1, 10000, true, collisionLayer); which works, but cannot seem to find something like that

TLDR: Basically I am trying to set the collides property to true on a specific layer named 'Collision', I think I could just go inside the function Tile and put an if statement in there?

Currently P2 is the only engine that we have automatic body creation for. Feel free to put in a PR to add the necessary conversion functions for arcade though.

Adding arcade physics support is tracked in #19.