I’m writing an Eclipse RCP application. Within this application I use a jMonkey Canvas. Now, I’m trying to change the camera position from outside the jMonkey rendering thread without any effect. It seems the canvas isn’t redrawing but if I click into my jMonkey canvas and just move the mouse a little bit then camera jumps to the correct postion.
The following code is executing by a Callable via SimpleApplication.enqueue
It is possible to force redrawing the canvas? I tried to called update and redraw methods on the Canvas object and its parents and the update method of the SimpleApplication but without success.
Are you sure the only problem is the camera or is the entire jME canvas “frozen” until you click? Does an object move even while the canvas is out of focus?
Problem was I had disabled the ChaseCamera, after I did orbitCamera.setEnabled(true); it works. orbitCamera is a instance of ChaseCamera. But still the behavior is a bit strange I would expected if the camera disabled then it mustn’t work.
In this case it won’t disable because the ChaseCamera controls an instance of a Camera. Disabling it disables the control it has over Camera and not the Camera itself.