FPS Aiming with mouse

I’m generally new with JMonkey. I started using the game engine to help build a game for a school project. I am having a problem with aiming in my fps game. I want to use the default setting where moving the mouse moves the camera, but the camera is set to a cameraNode that follows around my CharacterControl object. How can i apply the same action of aiming with the mouse the default BasicGame offers to what i have now?

you can have a look at the “hello collision” exemple (that feature a guy in a city. He is not flying, only walking, i think that it’s what you are looking for).

That said, the “good” way to do it is to implement your own “camera handling”, so you’ll be able to limit the angle of the movement etc.

And to summerize what the “hello collision” do for its camera : it just places the camera at the character location every frame. The camera is not attached to it, just place at its position everyframe.

I see what you are getting at, unfortunately it will not solve my problem. I am trying to control the direction that the node is looking at using the mouse.

Well, then you can listen to the mouse movement with the inputlistener. the listener need to be an AnalogListener.

Also, you’ll need to disable the flycam.

Can you give a sample of code that would execute this? Reminder I am a BEGINNER when it comes to some of this programming. I am a fast learner