Camera rotation

Hi, I'm new to jme, and I'm trying to get used to stuff.

I'm experimenting with SimpleGame, '' for example.

When I move mouse, the camera direction moves, how would this be turned off?

I looked at the Camera class, to find a method to apply to the cam object, but I didn't see anything useful

Thanks for any help.

That's not a part of the camera, it's a part of the FirstPersonHandler that is set up by SimpleGame by default. To disable it, you'll need to change your input to something else. You can't do input = null, because if you do that you'll get an NPE during your update.

I don't see any FirstPersonHandler object or input object to use.

Only half the user guide is filled in, so I donno how I'm supposed to learn anything.

Will take forever if I have to asking questions in this forum.

Thanks for any help

you have to look at the source of SimeplGame / BaseSimpleGame and understand how the things work.

In your simpleInit() Method, you can replace the default input handler with a new one which does nothing.

// removes the ThirdPersonController

input= new Input()

How new are you to java as a language? SimpleGame is a framework that creates many things for you, allowing you to get things up and running quite quickly. When you create things and extend simpleGame, you're getting all of its methods and objects, one of which is an InputHandler. FirstPersonHandler is used in SimpleGame, so it will be used in your extension thereof.

Familiarize yourself with SimpleGame so you can understand what you're working with when you do tests. Most people choose to extend BaseGame for their actual applications because it gives them total control over everything in the game, where SimpleGame requires you to disconnect many things to assume total control.

I'm quite experienced with java as a language, I've built my own chess engine, and I have almost finished building a 3D board using my own vector/math knowledge all with jdk1.5.0.

But I'm interested in using real chess piece models, to get that extra quality in the graphics, since it is too slow drawing the board and pieces with reflections, and it will be practically impossible to drag the pieces in real time, with the set up I have now using only jdk1.5.0.

But in JME, I noticed the fps value is still high even when nothing is moving, can the screen be repainted only when required, such as when pieces are moving, or player is rotating board?


Generally you would instead use vsync to keep a nice cap on the framerate.

Whats that?

Vsync makes the game render at the max frames per second that your monitor can show, so the game doesn't waste any effort in rendering.

Oooh sounds fancy. Any examples or tests?

Haha even though I said that, this all you need to enable it




But I wouldn't enable it when you develop your game because you won't be able to notice the performance changes when you use more effects and stuff.

ok, thank you!