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

How to control the speed of a rotation

$
0
0

So what's your value range for those rotationSpeed midi input values, [0, 127] integers?

Also, you seem to be using only whichRotation in the animation code, why do you assign the old value of rotation to it, you actually introduce a frame of latency by doing that, if real-time responsiveness is an issue for you.

What is the unit of measurement which you expect whichRot to have? ofVec2f.rotate() seems to be expecting degrees. Write the values of rotationSpeed, rotation, whichRot to console and check if that's what you expect.

If you render at a framerate of 60Hz, and want to have a rotation of lets say 360deg per second, whichRot/rotation should have a value around 360/60 == 6 deg/frame (modulo jitter), check the specific values against your assumptions.


Viewing all articles
Browse latest Browse all 40524

Trending Articles



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