CameraNode walk in camera Direction

I have created a cameraNode wich I can move around. But if I turn the cam around 180 degrees, and press W (walk forward) the camNode goes backwards. So my question is how I can move the camNode to the direction the camera is facing?

When you move your node forward, you have to add the normalized camera direction to the node position and maybe multiply it by a speed factor



Vector3f newPos=node.getLocalTranslation()+cam.getDirection().normalize().multLocal(speed);

node.setLocalTranslation(newPos);





Something like that