Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

which line of code moves the ball away from the user? ○ myball.pos.y = …

Question

which line of code moves the ball away from the user?
○ myball.pos.y = myball.pos.y - 2
○ myball.pos.x = myball.pos.z - 2
○ myball.pos = myball.pos.y + 2
○ myball.pos.z = myball.pos.z + 2

Explanation:

Brief Explanations

In a 3 - D coordinate system, if we assume the z - axis represents the direction towards and away from the user (forward - backward direction), increasing the z - value of the ball's position will move it away from the user. The line myBall.pos.z = myBall.pos.z + 2 increases the z - coordinate of the ball's position.

Answer:

myBall.pos.z = myBall.pos.z + 2