X and Y

Topic

X and Y

Topic Progress:

Movement is based upon the X and Y axis, where X is responsible for moving left and right while Y is responsible for moving up and down. An easy way to remember this is X is across, Y to the sky.

When coding the X and Y values can either be increased or decreased to change which direction it moves. The Position X = 0, Y=0 is the middle of the screen so to go left or down we need to make the number negative (use the minus symbol).

Increase X to move right

Decrease X to move left

Increase Y to move up

Decrease Y to move down

This image has an empty alt attribute; its file name is ezgif.com-video-to-gif-9.gif

@

Not recently active