Good day sirs,
I'm trying to figure out now is how to perform a collision detection for my player by using a Tiled Object layer, to be more specific I wanted it to detect a polyline which I have draw in my tiled map. As I was researching in google about collision detection for Tiled, I found this simple example superkoala sample for TiledmapLayer. In my understanding of the code (correct me if I'm wrong), It order to detect a collision the player will read each tile of a certain layer for example a foreground layer which contains the ground and other objects.
Basically, What I did with my Object layer is I named my polyline to Wall and for the type I put in numbers depending on how many polylines I have used. So that for future use I could call this wall numbers for my collision.
Can anyone give me a sample code about reading objects and using them for collision detection?or just a simple tip or Idea on how I could solve this?any help would be appreciated.