Intro to 3D Game Development

0 of 193 lessons complete (0%)

Scripting Part 1: Moving Objects


You don’t have access to this lesson
Please register or sign in to access the course content.
  1. You can animate an object by changing the X, Y, and Z values of its transforms.
  2. When an object has a parent, its local transform describes how it is positioned, rotated, and scaled in comparison to its parent, and its world transform describes where everything is relative to the center of the world.
  3. You can create variables by adding them above the start function. Some are primitive types, like numbers (1, 10, 0.001, -17) or Booleans (true or false). Others are class variables, like Vector3.
  4. You can access these variables using “this.:” along with other properties of the UserScript, like or this.entity.
  5. Unless they are private, these variables will also show up in the Entity panel.
  6. The start function runs once, right when the script loads. The tick function runs repeatedly after that, 60 times per second.
  7. You can write code that only runs sometimes using an if statement and a condition.
  8. You can also create local variables inside of a function with let, but they can’t be used outside of that function.
  9. You can create a function by giving it a name, and using () and then putting any code between {}