Playing Cards With Special Shrinking & Twisting Effects

You may know that Hearthstone was done in Unity (wooo!).

I am working on a card game, and I am trying to get some nice looking card playing effects like you see in Hearthstone:

You’ll notice the cards twist and turn subtlety as the player moves them around the board.

Am I correct in assuming this twisting and bending CANNOT be done with Unity’s UI system right?

If I need to use 3D world game objects, do you know how I could properly create the effect of moving and twisting the card with the mouse (or finger). Is this just a localToGlobal mapping thing, or is there some sort of matrix transformation that would be better suited to something like this.

Any and all advice on how to recreate these awesome Hearthstone card playing effects would be much appreciated!

I think you can do that with unity ui by using canvas renderer as World space, by that you can manipulate rotation etc.

Hi there :) Did you get any change on how to implement these effects?

1 Answer

1

Well, either way I would think about using 3D planes, the cards in the play field are 3D (casting correct shadows, UV warping, etc)
You can use the UI for your deck though, to be honest if it’s just a simple card game like this I don’t see why you would not make everything in 3D.

The twisting could be done in the UI, but the work is more than the outcome. You would have to code an entire UV manager plus the custom shaders to handle it all (Shadows/Alphas). for most people it’s not worth it, the would just use 3D. But a lot of the visuals just look like they are scaling the X and Y.
When the card is placed it looks like they just disable a game object and enable a UI texture on the board.

As for the twisting you can use simple mesh transforms or if you want to get really fancy Unity - Scripting API: Mesh.vertices.

Let me know if this helps you.