Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

Making a value increase then decreases

$
0
0

You probably need a separate boolean variable to indicate which direction you are going ... just from an int you can't tell whether you should be adding or subtracting.

Or you could use sine on frame number or something like that, though that won't give exactly the same result (i.e. a sine wave vs. a triangle wave)


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>