Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

multiple choice which line of code moves the ball up? ○ myball.pos = my…

Question

multiple choice
which line of code moves the ball up?
○ myball.pos = myball.pos + 1
○ myball.pos.y = myball.pos.y + 2
○ myball.pos.x = myball.pos.x + 1
○ myball.pos.z = myball.pos.z + 2

Explanation:

Brief Explanations

In a 2 - D or 3 - D coordinate system, the y - axis is typically used to represent the vertical direction. Increasing the y - coordinate value moves an object upwards.

Answer:

myBall.pos.y = myBall.pos.y + 2