You're drawing 2 kind of shapes to work as collisors: circles and rectangles.
If you want an event/tile to have its collision as a circle you'll use the following comment:
<circle cx='horizontal distance (in tiles) from the left of the tile' cy='vertical distance (in tiles) from the top of the tile' r='size (in tiles) of the circle' />
1 = 48px (tile size)
0.5 = 24px
0.25 = 12px
Example:
<collider>
<circle cx='0.5' cy='0.5' r='0.5' />
</collider>
In this example the circle collisor will have 24px size (0.5 of a tile = 1/2 of 48px). He will be positioned half a tile to the right and half a tile down. If you put "2" in "cx" the circle collisor will be put 2 tiles to the right of the event.
View attachment 113973
If you want to make a rectangle collisor you'll use the following comment:
<rect x='horizontal distance (in tiles) from the left of the tile' y='vertical distance (in tiles) from the top of the tile' width='width (in tiles)' height='height (in tiles)' />
Example:
<collider>
<rect x='0.6' y='0' width='0.4' height='1' />
</collider>
In this example I made a rectangle collisor, with a full tile height and 0.4 of width. He will be placed 0.6 of a tile to the right.
View attachment 113974
If you want an event/tile to have its collision as a circle you'll use the following comment:
<circle cx='horizontal distance (in tiles) from the left of the tile' cy='vertical distance (in tiles) from the top of the tile' r='size (in tiles) of the circle' />
1 = 48px (tile size)
0.5 = 24px
0.25 = 12px
Example:
<collider>
<circle cx='0.5' cy='0.5' r='0.5' />
</collider>
In this example the circle collisor will have 24px size (0.5 of a tile = 1/2 of 48px). He will be positioned half a tile to the right and half a tile down. If you put "2" in "cx" the circle collisor will be put 2 tiles to the right of the event.
View attachment 113973
If you want to make a rectangle collisor you'll use the following comment:
<rect x='horizontal distance (in tiles) from the left of the tile' y='vertical distance (in tiles) from the top of the tile' width='width (in tiles)' height='height (in tiles)' />
Example:
<collider>
<rect x='0.6' y='0' width='0.4' height='1' />
</collider>
In this example I made a rectangle collisor, with a full tile height and 0.4 of width. He will be placed 0.6 of a tile to the right.
View attachment 113974
Could someone make a tutorial on how to use collision detection for parallax maps? Thanks.