Intro to 3D Game Development

0 of 193 lessons complete (0%)

Scripting Part 1: Moving Objects

Change the Chest’s Position with Code

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

Next we’re going to move the object again, but with code.

Press enter between the { } of the start function to make a space for a new line, and add the following line:

this.entity.worldTransform.position.y = 10

If the chest doesn’t move automatically, press the Play button to run the code.