Hello Guest

Author Topic: Mesh.Optimize tk2dStaticSpriteBatcher's MeshCollider?  (Read 4342 times)

pan_henryk

  • Newbie
  • *
  • Posts: 20
    • View Profile
Mesh.Optimize tk2dStaticSpriteBatcher's MeshCollider?
« on: June 10, 2014, 11:48:18 am »
I am experimenting with tk2dStaticSpriteBatcher for objects with colliders. I wonder if it makes sense to call Mesh.Optimize for MeshCollider generated by batcher from series of Box Colliders?


unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Mesh.Optimize tk2dStaticSpriteBatcher's MeshCollider?
« Reply #1 on: June 10, 2014, 11:53:20 am »
mesh optimize optimizes for rendering. Don't think it'll help at all for mesh colliders.

pan_henryk

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Mesh.Optimize tk2dStaticSpriteBatcher's MeshCollider?
« Reply #2 on: June 10, 2014, 06:15:15 pm »
I see. Thanks!
Now I need to check what optimization could be applied to mesh collider, as (in my case) it is often built of adjacent box coliders.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Mesh.Optimize tk2dStaticSpriteBatcher's MeshCollider?
« Reply #3 on: June 10, 2014, 10:34:05 pm »
Nothing that is readily available. The tilemap editor does some optimizations that will reduce adjacent boxes to one edge collider but that will not directly apply to the static sprite batcher. You do have the code available if you're feeling like you want to get your hands dirty..