Well there is a depth buffer, and transparency does mostly work in 3D. Not always though.
You can rotate the corners with a bit of math. It’s just a matter of applying them to a distort mesh.
One idea place four sprites at
-32,-48
32,-48
32,48
-32,48
These will serve as our points. Give them three instance variables z, Newx and newz.
then you can rotate them with:
var a=0
var sa=0
var ca=0
every tick:
— set a to time*10
— set sa to sin(a)
— set ca to cos(a)
-- sprite: set newx to self.x*ca-self.z*sa
-- sprite: set newz to self.x*sa-self.z*ca
every tick
— card: set size to (1,1)
-- card: set distort mesh to 2,2
-- set distort at 0,0 to card.x+sprite(0).newx, card.+sprite(0).y, 32+sprite(0).newz, -1,-1
-- do the same for the other points:
0,1 with sprite(1)
1,1 with sprite(2)
1,0 with sprite(3)
sorry i trailed off with the bit where you set the distort points. generally youd have card have a size of 1,1 and place the points with absolute. Unless something changed you can’t use a negative z for a distort point, so you’d need to shift things a bit higher.