OCD damjker and controlP5
in
Contributed Library Questions
•
2 years ago
Hi,
I'm having the following problem using controlP5 and OCD damjker's camera in a 3D applet. If I change the fov of the camera that renders my 3d scene the gui also zooms in and out, even though I have a separate camera for the rendering of the gui.
A particularly strange aspect of this problem is that the problem does not occur on some computers and it never occurs when I run my app packaged as an executable. Any thoughts would be greatly appreciated.
Thanks,
Niko
Here's some code that suggests the structure of my program:
public void draw() {
...
//draw gui
guiCamera.feed();
pushMatrix();
translate(-width / 2, -height / 2);
noLights();
controlP5.draw();
popMatrix();
camera1.feed();
//draw all 3d geometry
...
}
//and here's the method that updates camera1's fov
public void mouseWheel(int delta) {
if (delta==1)
{
camera1.zoom(PI/50);
}
if (delta==-1)
{
camera1.zoom(-PI/100);
}
}
1