chaseCamera Horizental rotation

Hi!

is there away to increase the Horizental rotation of the chaseCamera?

at the moment i can allmost rotate my character about 70 degres



it works with setDragToRotate true… but i dont want that :slight_smile:



any suggestions would be great

There is no hardcoded limit on horizontal rotation in the chasecam code.



You’re doing something wrong.



Show your code (using the java tags).



Also, how else do you want to rotate the camera except by using the setDragToRotate?

Well i got the horizontal working…

Now i just got an animation problem…



[java]



act = player_model.getControl(AnimControl.class);

act.addListener(this);

ach = act.createChannel();



ach.setLoopMode(LoopMode.Loop);

if (!ach.getAnimationName().equals(“Wave”)) {

ach.setAnim(“Wave”, 0.5f);

}

[/java]



java.lang.NullPointerException

at mygame.Main.simpleUpdate(Main.java:536)

at com.jme3.app.SimpleApplication.update(SimpleApplication.java:244)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:149)

at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:182)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:223)

at java.lang.Thread.run(Thread.java:722)



any ideas on this?



Blender file : www.wuild.com/character.blend

:roll: NullPointerException is the easiest error to track down. Somethings null in that line, find out what. What is line 536? Probably that spatial has no AnimControl and line 536 is the act.addListener() one.

so how can i add the AnimControl to my model?



[java]

player_node = new Node("Player Node");

player_model = (Node) assetManager.loadModel("Models/character.j3o");

player_model.setLocalScale(3f);

player_model.getLocalTranslation().addLocal(0, -3.6f, 0); // model offset fix

player_node.attachChild(player_model);

player_model.setShadowMode(ShadowMode.CastAndReceive);

[/java]

Duh… An AnimControl exists only when theres animations on that model… Please read the tutorials instead of copy-pasing the code only. You can open a model in the SDK and see where the AnimControl is.

I have been reading tutorials and document for the past 2 days on this.

And i dont even know if i made the animation correct… theres not many tutorials on that for blender 3.x

right, apart from two videos and two guides…

blender to jme3 though ogre XML - YouTube

Alright made some modifications…

Now i can see the



AnimControl inside the “cubes” of my character…



i also did [java] if(act.isEnabled()){

System.out.println(“Enabled”);

}[/java]



but Enabled is never printed out… even that i can see that the model got AnimControls