Floating

Blitz3D Forums/Blitz3D Beginners Area/Floating

RetroRusty(Posted 2004) [#1]
Does anyone have any code that makes an image float? I want an image to move up and down the top of the screen but it's y speed changing so it looks like its floating.

Thanks


CS_TBL(Posted 2004) [#2]
use the output of a sin(phase#)*amp .. and add it to the y-coordinate of your image for each frame of the animation ..

(or use a table, but a single sine really is a cookie)