Camera rotation with mouse

Hi all,

I try to make a camera following a 3rd-Person character put i have a problem :

I create the CameraNode method because i want the camera follows immediately the target. Flies at same speed as target. So I do not want to use the chase camera.
[java]camNode = new CameraNode(“Camera node”, cam);
camNode.setControlDir(CameraControl.ControlDirection.SpatialToCamera);
playerNode.attachChild(camNode);[/java]

To rotate the camera, I use the MouseAxisTrigger. And when the user move the mouse, the character and the camera rotate both:
[java]private AnalogListener mouseXaxis = new AnalogListener() {
public void onAnalog(String name, float value, float tpf) {
if(MAPPING_MOUSE_X_AXIS_LEFT.equals(name)) {
player.rotate(0, -tpf * 4, 0);
} else if (MAPPING_MOUSE_X_AXIS_RIGHT.equals(name)) {
player.rotate(0, tpf * 4, 0);
}
}
};[/java]

The problem is simple, when the camera arrives at the window border, you cannot rotate the character anymore. I try to get the mouse and relocate it but the MouseInput.get() is not working anymore. And i really do not want to use a robot because it is only working on fullscreen mode.

So, what can i do ?

Thank a lot for your answers.

@VonDriguen said: when the camera arrives at the window border, you cannot rotate the character anymore.
@VonDriguen said: And i really do not want to use a robot because it is only working on fullscreen mode.

I’m not understanding what either of these two things mean. Can you elaborate a bit?

The first one makes no sense to me because I know the context of what you are talking about, but either don’t understand what you mean by this, or something drastic has change about the relationship between the Camera & ViewPort.

The second makes no sense because I have no clue what you mean by robot.

Anyways… you’re likely to get help if you can clarify these two points.

@vondriguen said: And i really do not want to use a robot because it is only working on fullscreen mode.
Before making the post, I search by myself and I found those topics : http://hub.jmonkeyengine.org/forum/topic/set-the-cursor-location/. http://hub.jmonkeyengine.org/forum/topic/solved-setting-the-hardware-mouse-position/ And there are talking about create a Robot.
@vondriguen said: when the camera arrives at the window border, you cannot rotate the character anymore.
You know, when you are playing and you want to make a 180° rotation. you move the mouse left and your character rotate only 45°. After, you pick up your mouse, move it to the center of your desk and move it left again... and so on until your character rotate 180°. I want to do the same. But for the moment, when the character rotate 45°, i am not able to rotate it anymore because the mouse reach the border.

I Hope i am clear now =D

Ok, I find by mysef : mouseInput.setCursorVisible(false);

Can you elaborate please…