Hello Guest

Author Topic: Tilemap Collider Generation Above Layer Blocking  (Read 3939 times)

kstolp

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 1
    • View Profile
Tilemap Collider Generation Above Layer Blocking
« on: September 01, 2014, 05:41:14 am »
Hey, I am loving the Tilemap system, but have come to a need to have some way of having the system check the layer above when generating the colliders to see if there is anything tiles above that one. then if there is a tile on another layer above it would cancel its Collider Generation.

this is for a top down 2d hack and slash. a bridge that goes over a cliff edge. I would like it so that i do not need to remove the elements below.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tilemap Collider Generation Above Layer Blocking
« Reply #1 on: September 01, 2014, 11:19:49 am »
There isn't any way to do that, but you do have the source code and you can do whatever you like with it :)
tk2dTileMapColliderBuilder.BuildLocalMeshForChunk / tk2dtileMapColliderbuilder2D.BuildLocalMeshForChunk is what builds the colliders for each chunk. You can perform the test there, after
Code: [Select]
if (tilePrefabs[spriteIdx])
continue;
and cancel generation there.