playMaker

Author Topic: Dynamic texture change.  (Read 1847 times)

Nodixal

  • Playmaker Newbie
  • *
  • Posts: 16
Dynamic texture change.
« on: March 30, 2015, 02:22:30 PM »
Hey guys, so let's say I use a deck of cards. Every time I draw a card I would like to assign the appropriate texture to the new generated card (which works so far) the issue is when I draw a new card, the texture swaps on all created cards to the new texture since I use the same Material on all of them. So my question is, can you create a new material and assign it that new texture in playmaker?
« Last Edit: March 31, 2015, 11:25:42 AM by Nodixal »

TheBadFeeling

  • Junior Playmaker
  • **
  • Posts: 66
Re: Dynamic texture change.
« Reply #1 on: March 30, 2015, 03:56:42 PM »
If you have all your cards on the same texture, you could just move the texture coordinates for the particular card object and keep the material unchanged. Cheaper on the mats too.

/Bad
The Force is with you, young Playmaker – but you are not a C# senpai yet.

Nodixal

  • Playmaker Newbie
  • *
  • Posts: 16
Re: Dynamic texture change.
« Reply #2 on: March 31, 2015, 11:24:24 AM »
It's not possible to do that, I have literally thousands of card art haha. What I ended up doing is create 100 Empty Materials (Maximum different cards played during a game) added them to a Array list, as a card is generated, I assign the correct texture to the first material in the array and then remove it from the array. I get all my correct art this way right now.