Hello Guest

Author Topic: tk2d Custom Mesh  (Read 4320 times)

liccowee

  • Newbie
  • *
  • Posts: 1
    • View Profile
tk2d Custom Mesh
« on: June 21, 2013, 04:04:37 am »
HI,

I wan to have a custom mesh for my tk2dSprite, but I was unable to assign my custom mesh to the tk2dSprite, because tk2dSprite will override my mesh in runtime. Is that any method which allow me to custom my mesh?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: tk2d Custom Mesh
« Reply #1 on: June 21, 2013, 11:05:31 am »
You can't have a custom mesh with a sprite, as the sprite is created using a custom mesh. You can load the sprite UV data and apply it to your own custom mesh. Basically, you'll have to write your own class similar to tk2dSprite, creating your custom mesh instead.

Note: this isn't as easy as it sounds, as the sprites in the atlas can be processed in any number of ways.