I have a gun which you can aim down the red dot sight. If you are moving while aimed down sight, there is some bobbing that comes into play. The arms are bobbing, not the camera itself.
Currently when the player fires their gun, I fire a ray from the center of the camera and check for a hit on a player.
The problem is, if the player is aiming and moving, the red dot is bobbing(since the arms are) but because the camera isn't, the ray always fires down the center which doesn't line up with the red dot. It Doesn't feel right in gameplay.
I was hoping someone may have some ideas to offer on how to handle this..