- Home /
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:
https://youtu.be/mQcSaLT_Zow?t=1m4s
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?
Answer by jmgek · Dec 08, 2015 at 12:20 AM
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 http://docs.unity3d.com/ScriptReference/Mesh-vertices.html.
Let me know if this helps you.
Your answer
Follow this Question
Related Questions
UI Cards, how to scale them properly ? 0 Answers
Raycast from 2D canvas object to world space 1 Answer
Issues with world space canvas for different resolutions. Any Workaround ? 0 Answers
When loading into a new scene my UI doesn't work anymore? 3 Answers
UI in Scene View only Rendered Backward 0 Answers