Intro to 3D Game Development

0 of 193 lessons complete (0%)

Scripting Part 1: Moving Objects

Call the Function to Move the Chest

You don’t have access to this lesson
Please register or sign in to access the course content.

Unlike start  and tick, functions that you create do not run automatically. We will need to tell the code when to run it, by calling the function.

The when is easy in this case, because it’s where the code used to run, over and over again in the tick function.

  • In the tick function, add this.moveChest()
The finished code for Scripting Part 1

Testing: It Moves Again

Press play, and test that now your chest moves up the exact same way it did before.