Answers.Body: <p><a href="https://i.sstatic.net/VbIDk.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-09T08:35:42.823Z
Answers.LastActivityDate: 2023-02-09T14:15:52.580Z
Answers.LastEditDate: 2023-02-09T14:15:52.580Z
Answers.UserDisplayName: tomh
Body: <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.sstatic.net/Urx9J.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/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.sstatic.net/X57f0.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/X57f0.png" alt="enter image description here" /></a></p>
  
Tags: <after-effects><animation>
Title: How to animate a square folding in half diagonally in After Effects?
UserDisplayName: Webdev95
ThreadText: # How to animate a square folding in half diagonally in After Effects?
  
  (Asked by: username_0 on 2023-02-08)
  
  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:
  [![enter image description here](https://i.sstatic.net/Urx9J.png)](https://i.sstatic.net/Urx9J.png)
  
  The I am trying to fold it on the diagonal but it isn't working.
  [![enter image description here](https://i.sstatic.net/X57f0.png)](https://i.sstatic.net/X57f0.png)
  
  **Tags:** after-effects, animation
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-02-09. Score: 1
  
  [![grab](https://i.sstatic.net/VbIDk.gif)](https://i.sstatic.net/VbIDk.gif)
  
  Make a square
  
  Centre the square on screen
  
  Make sure the [anchor point](https://www.schoolofmotion.com/blog/anchor-point-in-after-effects) 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.
  
  
  ---
  
  