Step 3

Velocity

We can make our character move around by using blocks from the Physics category. Go back to editing the script, and grab the "Set velocity x 0" block from Physics, and drag it under the previous blocks. Change 0 to 100, and the Play the game.

Now go back to editing and change the x position to 300 and the y position to 300, so that the character is near the middle of the screen. Then change the x velocity from 100 to -100. A negative x velocity should make the character move which way?

Once more, go back to editing and grab another "Set velocity x 0" block from Physics. Drag this one underneath the previous one, and change this from velocity x to velocity y by clicking on the x and selecting y. Change is from "Set velocity y 0" to "Set velocity y 100".

Now that the x velocity is -100 and the y velocity is 100, which way will the character move? Click Play to find out!

results matching ""

    No results matching ""