I'm working on a javascript animation which consists of a fake 3D cylinder rotating on its Z axis. I've done it within After Effects but whatever, this is a code/maths question.
I have a "Zrot" variable driving some shapes changes, which "simulates" a rotating 3D object on one axis - so this is not 3D but 2D.
Now I need to be able to rotate my layer, but when doing it, the angle looks weird.
What I'm searching for is a formula to calculate a "zrot" offset based on the layer rotation.
var frontRot = 78;
var zRotOffset = frontRot * ...
If you know some 3D softwares, it is kind of like local rotation VS global rotation.
Can anyone help ?
Thanks !