Page 1 of 1

Moving an object offscreen at a diagonal?

Posted: Tue Oct 26, 2021 6:41 pm
by bloobeary
Is it possible to move an object off the edge of the screen, by having it travel at a diagonal angle?

I'm thinking of doing a sort of "flyby" where a craft starts (at tiny size) near the left side of the screen, and then moves up and offscreen towards the top right while increasing in size. Sort of give the impression of it flying overhead.

I know that you can place anything anywhere onscreen by use of decimal locations from 0.0 to 1.0 on the x and y, but offscreen?

Is this possible?

Afterthought Addendum:
I suppose I could do it by using a mostly transparent image area larger than screensize and just enlarging it in total until the visible part was offscreen. I'm still interested in knowing if there are offscreen co-ordinates that can be used though.

Re: Moving an object offscreen at a diagonal?

Posted: Tue Oct 26, 2021 7:01 pm
by Ocelot

Code: Select all

show "starship.png":
    anchor (0.5, 0.5)
    pos (-1.0, 0.9)
    linear 10 pos (2.0, 0.1)
Will display image moving from bottomish left offscreen to top right offscreen.