Jump to content

Object in tile collision


Simon Zach
 Share

Recommended Posts

Hi Guys,

lets say i have a tile 256x512. In the middle is a barrel. How to create a collision between player and barrel only? Not with the whole image.

I made some research and found tiled: https://doc.mapeditor.org/en/stable/manual/editing-tilesets/#tile-collision-editor

But to be honest i dont know how to use this property. Basically tiled just generate a collision zone according to your setting for example 100x100 in the given tiled.

I am wondering how to implement this? I cant find in API anything with the collider zone size. I just found how to set a collision with the whole tile:

https://photonstorm.github.io/phaser3-docs/Phaser.Tilemaps.StaticTilemapLayer.html#setCollision__anchor

 

Link to comment
Share on other sites

  • 2 months later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...