SceneToolController AppState is now always after the CameraController in the AppState list in the SceneApplication

experimental
Nehon 10 years ago
parent 52ebd9090c
commit c3ab5b3748
  1. 7
      sdk/jme3-core/src/com/jme3/gde/core/scene/controller/AbstractCameraController.java
  2. 3
      sdk/jme3-core/src/com/jme3/gde/core/scene/controller/SceneToolController.java

@ -97,7 +97,14 @@ public abstract class AbstractCameraController extends AbstractAppState implemen
}
public void enable() {
SceneToolController c = SceneApplication.getApplication().getStateManager().getState(SceneToolController.class);
if(c != null){
SceneApplication.getApplication().getStateManager().detach(c);
SceneApplication.getApplication().getStateManager().attach(this);
SceneApplication.getApplication().getStateManager().attach(c);
}else{
SceneApplication.getApplication().getStateManager().attach(this);
}
final AbstractCameraController cc = SceneApplication.getApplication().getActiveCameraController();
SceneApplication.getApplication().setActiveCameraController(this);

@ -423,10 +423,9 @@ public class SceneToolController implements AppState {
selectionShape.setLocalTranslation(selected.getWorldTranslation());
selectionShape.setLocalRotation(selected.getWorldRotation());
//selectionShape.setLocalScale(selected.getWorldScale());
selectionShape.setLocalScale(selected.getWorldScale());
}
public void render(RenderManager rm) {
// throw new UnsupportedOperationException("Not supported yet.");
}

Loading…
Cancel
Save