Intro to 3D Game Development

0 of 193 lessons complete (0%)

Scripting Part 2: Making Code Respond to Players

Rename the goalRotation and startRotation Variables

You don’t have access to this lesson

Please register or sign in to access the course content.

Since we’ll be animating both directions, it makes sense to rename the goalRotation and startRotation variables, so that it’s easier to know which to use when we make the closing animation.

  1. Use Ctrl+F or right click and open the Command Palette and search for “find”.
  2. Type goalRotation in the Find field, and use the arrow drop down to type openRotation in the Replace field.
  3. Press enter in the Replace field once to replace each place that goalRotation is used. Once you have replaced all of them, the search should tell you that it can’t find it anymore.
  4. Repeat this process changing