ofxUI and easy camera

Hi forum,

I am using the ofxUI to capture the use interaction and send to the glsl shaders to work over my scene. Now i have one issue.

When i drag the UI inside the scene, without changing any of its parameters the model also moves/orients and it is not something i would like to have.

I would like to stop any model interaction when i am just dragging the ui around.

How is it possible ?

Here goes the snapshot of the small application

http://imgur.com/KpmTHN0

The easy camera is implemented as follows:

void ofApp::draw()
{
   ofSetColor(255);
   
   ofEnableBlendMode(OF_BLENDMODE_ALPHA);
   
   ofEnableDepthTest();

   shader.begin();

   ((rim_enable) ? shader.setUniform4f("rim_color",rim_color.r,rim_color.g,rim_color.b,rim_color.a) :
    shader.setUniform4f("rim_color",0.0f,0.0f,0.0f,1.0f));
   shader.setUniform1f("specular_power",30.0f);
   
   camera.begin();
   ofPushMatrix();
   ofTranslate(-ofGetWidth()/2,-ofGetHeight()/2);

   model.drawFaces();
   ofPopMatrix();
   camera.end();

   shader.end();
}

Any hint to get around this issue?

Thanks

have a look here:

there are several solutions depending on your setup.

you can do cam.disableMouseInput()

3 Likes