Now we can figure out how to move the chest to the right place before it starts animating, to make it actually look like it is coming out of the ground at the dig spot.
- Give your startDiggingUpChestAnimation a parameter called digSpotPosition, with a type of Vector3. This will be the world position of the Dig Spot.
- Create a new variable with let called x, and set it to the x property of digSpotPosition.
- Create another variable with let called y, and set it to the y property of the digSpotPosition, but subtract amountToMoveUp from it so that it starts out under the Dig Spot, before it moves up.
- Create a z variable and set it to the z value of digSpotPosition.
- Set this entity’s world position to the x, y, and z variables that you just made.