I do custom camera control.
tracking mouse movement in onClientCursorMove
modify the camera position in onClientPreRender
change the camera position setCameraMatrix
localPlayer turn in the direction of the camera using setElementRotation,
set direction to target setCameraTarget( targetX, target, target )
at the same time visually the model directs the weapon in the right direction,
but the shooting is not in this direction but strictly forward
for the horizontal plane, this is not critical because in this plane the direction of the player and the camera are the same,
but for the vertical plane this is not the case, the obvious solution to rotate the player in the vertical plane leads to 2 problems:
at significant angles difficult movement of the player
it is not possible to use this mechanism for a third-person regime
Need a function that allows you to set the direction of fire. it could be setCameraTarget, if it changed not only the visual direction, but the actual direction of the fire.
Or a separate function allows you to set the angle of fire in the vertical plane.
I would also like to be able to set for the camera not only FOV but also AspectRatio, NearClip, FarClip