QUESTION IMAGE
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
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.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
myBall.pos.z = myBall.pos.z + 2