Skip to content

CSV TileMap don't handle collision #692

@Chapelin

Description

@Chapelin

Hi,

I found out that game.physics.arcade.collide crash when you use it on a layer created from a CSV tileMap.
It seems that the function separateTile: function (i, body, tile) don't handle tile's layer correctly.
The object tile contains an attribute "layer", which is an object when the tile comes from a Json map, but an integer index when it comes from a CSV map.

I am still a newbie in JS, even more with phaser, so when i tried to find where "layer" was set i found nothing.
An example is visible here : http://jsfiddle.net/kW9Yr/ (uncomment "update" code to crash)

I asked on html5gamedev forum, but nobody have answered since, so maybe it's just my bad and the error is in my example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions