Hello Guest

Author Topic: normal and tangent on Tilemap  (Read 4480 times)

Elzean

  • Newbie
  • *
  • Posts: 1
    • View Profile
normal and tangent on Tilemap
« on: October 30, 2012, 05:25:22 pm »
Hi!

i'm trying to use some 3d lights with sprites. It is working well with the usual sprite but i didnt succeed to make it work with the tilemap. I'm trying to arrange some code, but before making a mess i would like to know if its possible and if there is a simple solution to make this happen ?

Thanks!


unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: normal and tangent on Tilemap
« Reply #1 on: October 30, 2012, 07:25:02 pm »
Hi,

If your tilemap is static, all you need to do is add this one line in tk2dTileMapMeshBuilder -

Code: [Select]
chunk.mesh.RecalculateNormals(); // add this line
chunk.mesh.RecalculateBounds();