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

Limtiing and adjsuting rotations qu

$
0
0

I have some text that is rotated from an ofQuaternion that I get from ofxOpenNi. I want to make an offset for that text so that in a standing position the text is where I want it.

From that begining position I want to rotate the text within limits I set, but things seem to work in a strange way (my upper limits act like lower limits and vice versa).

void testApp::drawRotateTextFromLegAngleSimple(){
      if (leftStringsOn==true) {
           ofPushView();
           
           glPushMatrix();
           ofTranslate(leftXOffset, leftYOffset);
           if (interaction) {
       
                          
                          ofRotateZ(-ofMap((rotationZMidLeft *leftRotationZMultiplier[i]+leftRotateZDelta[i]), -180, 180, leftRotationZMin[i], leftRotationZMax[i]));

This does work and I have a gui to get everything right but I feel like I should not use this ofRotateZ method like this.


Viewing all articles
Browse latest Browse all 40524

Trending Articles



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