Hi, I recently got into jMonkeyEngine and I love it so far. I was trying to program different states when I came across this problem. I keep getting the error: “Incompatible types - Required: com.bulletphysics.collision.broadphase.Dbvt.Node Found: com.jme3.scene.Node” while trying to initialize the rootNode.
Here is my code:
Main Class
[jpackage mygame;
import com.jme3.app.SimpleApplication;
import com.jme3.renderer.RenderManager;
public class Main extends SimpleApplication {
MainMenu MainMenu = new MainMenu();
public static void main(String[] args) {
Main app = new Main();
app.start();
}
@Override
public void simpleInitApp() {
stateManager.attach(MainMenu);
}
@Override
public void simpleUpdate(float tpf) {
//TODO: add update code
}
@Override
public void simpleRender(RenderManager rm) {
//TODO: add render code
}
}]
MainMenu Class
[jpackage mygame;
import com.bulletphysics.collision.broadphase.Dbvt.Node;
import com.jme3.app.Application;
import com.jme3.app.SimpleApplication;
import com.jme3.app.state.AbstractAppState;
import com.jme3.app.state.AppStateManager;
import com.jme3.asset.AssetManager;
public class MainMenu extends AbstractAppState {
private SimpleApplication app;
private Node rootNode;
private AssetManager assetManager;
@Override
public void initialize(AppStateManager stateManager, Application app) {
super.initialize(stateManager, app);
this.app = (SimpleApplication) app;
this.rootNode = this.app.getRootNode(); // This is where the error is occuring
}
@Override
public void update(float tpf) {
}
@Override
public void cleanup() {
}
}]
Any help would be appreciated. Thanks a lot!