user40535: I have a square that I am trying to fold in half in After Effects. I made two squares and masked each one. I then made the bottom half a 3D layer and tried working with the Y and Z rotation. But it isn't working the way I need it to.
Here is a visual for what I am trying to achieve.
Here is the square in the original format:

The I am trying to fold it on the diagonal but it isn't working.


user4426: 
Make a square
Centre the square on screen
Make sure the anchor point for the square is exactly at the position where the rotation should take place.
Add a mask revealing half the square
Duplicate the square
Change the colour of the duplicate to make it easier to see what you're doing
Change the mask on square 2 to 'subtract' mode, to reveal the other half
Make both layers 3D
Add a null object (it will be in the centre of the screen)
Make it 3D
Rotate it on the Z axis by 45 degrees
Pair square 2 to the null object
Animate the Y axis on the null object between 0 and -180 degrees.
The lower half of the square will fold up to meet the upper half.

40535: <p>I have a square that I am trying to fold in half in After Effects. I made two squares and masked each one. I then made the bottom half a 3D layer and tried working with the Y and Z rotation. But it isn't working the way I need it to.</p>
<p>Here is a visual for what I am trying to achieve.
Here is the square in the original format:
<a href="https://i.stack.imgur.com/Urx9J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Urx9J.png" alt="enter image description here" /></a></p>
<p>The I am trying to fold it on the diagonal but it isn't working.
<a href="https://i.stack.imgur.com/X57f0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X57f0.png" alt="enter image description here" /></a></p>
 4426: <p><a href="https://i.stack.imgur.com/VbIDk.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VbIDk.gif" alt="grab" /></a></p>
<p>Make a square</p>
<p>Centre the square on screen</p>
<p>Make sure the <a href="https://www.schoolofmotion.com/blog/anchor-point-in-after-effects" rel="nofollow noreferrer">anchor point</a> for the square is exactly at the position where the rotation should take place.</p>
<p>Add a mask revealing half the square</p>
<p>Duplicate the square</p>
<p>Change the colour of the duplicate to make it easier to see what you're doing</p>
<p>Change the mask on square 2 to 'subtract' mode, to reveal the other half</p>
<p>Make both layers 3D</p>
<p>Add a null object (it will be in the centre of the screen)</p>
<p>Make it 3D</p>
<p>Rotate it on the Z axis by 45 degrees</p>
<p>Pair square 2 to the null object</p>
<p>Animate the Y axis on the null object between 0 and -180 degrees.</p>
<p>The lower half of the square will fold up to meet the upper half.</p>
