-
simulate 3d Yrotation on a 2d rectangle created with createPath
hello!
This has probably been discussed before, but I have not been able to find the answer.
Using createPath with this expression, I am following a 3d null called “3dNull”. Everything works great
My question is, would it be possible to somehow modify it so that the rectangle created via createPath is always 90º relative to the Y axis of the null it follows? It would be like creating a plane perpendicular to the Y rotation plane of the null, but I don’t know if it is too tricky to work with the 4 vertices of the shape being purely 2d.
Thank you very much in advance!
L=thisComp.layer("3dNull")
R=L.sourceRectAtTime(time,false);
UL = fromCompToSurface(L.toComp([R.left,R.top]));
UR = fromCompToSurface(L.toComp([R.left+R.width,R.top]));
LR = fromCompToSurface(L.toComp([R.left+R.width,R.top+R.height]));
LL = fromCompToSurface(L.toComp([R.left,R.top+R.height]));
createPath(points = [[UR[0],UR[1]],[LR[0],LR[1]],[LL[0],LL[1]],[UL[0],UL[1]]]], inTangents = [[0,0],[0,0],[0,0],[0,0],[0,0]], outTangents = [[0,0],[0,0],[0,0],[0,0]],[0,0]], is_closed = true);