How do I move an object upwards?

I need help I’m doing this project and I don’t know how to move the object upwards.

make the rocket a extra shape or function
and change y

y--;
myRocket(x,y);
1 Like

in draw()

translate (200,y);
// draw rocket
y--;

And also in setup() say y=height + 50; or similar to set the initial value for y.

Chrisir

1 Like

The key thing is to update the location variable for the height (for example, y). If you do it each time draw runs, the rocket while move up for as long as the sketch is running, flying off the screen.

If you are trying to draw an object in a different place, it may also help you to review these intro tutorials on coordinates and 2D transformations:

1 Like