LibGDX Tiled Collision

Ahoy!

I’ve googled and searched all over for the best way to do collision via Tiled and LibGDX and haven’t had any luck, even with past forum topics here on JGO. I am looking for the best way to detect whether an object is touching a tile with property “blocked”, then sends them back. It should be simple… however every post on google about it includes things about corners and such.

Please, can someone explain. I would honestly prefer a pastebin example or something. ^^
Thanks!

  • A

Pasting my answer from your other thread here as well in case someone does a search looking for the same answer.

Follow dermetfans tutorial on LibGDX + Tiled collision.

Here his collision tutorial:

And the code:
https://bitbucket.org/dermetfan/tiledmapgame/src/382e8070f991c93bb2582cd54a6636d3901d2758/TiledMapGame/src/net/dermetfan/tiledMapGame/entities/Player.java?at=default

Oh, thanks!