Implement a first-person-shooter like controller.

The input position and rotation parameters are returned modified according to the state of the control keys.

This function is usually used by passing the current camera position and rotation then updating the camera transformation with the returned values.