SpriteMap and collision

Hello everyone :grin:,

I used this example to create my own 2D map and it worked like a charm :slight_smile: , but now I want my player to collide with certain tiles and I have no idea how doing it. How to determine the tiles position, size, type ect… from the spriteMap ? How to tell my player you can go through this tile but not this one ?

Thanks in advance

Welcome aboard!

Maybe @Pryme8 will be able to help as I know he has used sprites quite a bit lately.

1 Like

Let me find the example with a player on it, it has some hit stuff going!

Give me a bit here.

https://www.babylonjs-playground.com/#FERKRD#3

1 Like

Thanks a lot for your answer :grin:
So I guess sprite tiles is just for decoration and not meant to directly interact with

1 Like

I mean technically yes, they are just visualizing your data. How you decide to make the physics interact with them is a separate problem.

1 Like