Hello TWHL.
I hope you'll help me to sort out this trouble I'm having.
The thing is, I'm a noob coder and I'm trying to make Sonic Adventure/Soul Reaver-like camera and controls, I've stuck at the very beginning though.
First what I did was going to server camera code and skipping that chunk of code that softens up camera movement: now difference between hmtarget and camera origin is written into pev->angles right away, we've got an instant rotation.
Then on client side, IN_JoyMove to be precise, I had to get camera angles.
(I tried making a custom message from server, then I tried GetEntityByIndex( viewEntityIndex ), the effect was the same)
To achieve this kind of controls I have to take an angle given by input device and transform it from the coordinates based on camera axis to global coordinates, it can be done either by rotating a 3d vector or simply adding two yaw values, I tried both.
The thing is I kinda got what I needed, but making player to go pure 90 degree to the side (and remember that camera follows him) doesn't really make him run a perfect circle around the camera as one would expect, I'm getting a gradual spiral instead.
Yaw value calculated for the player is wrong by from 60 degrees (right under the camera) to about zero when he's a few hundred units away. I wonder is it engine architecture issue or I've ran into some kind of basic geometrical law.
https://www.youtube.com/watch?v=_hEam9Uk_fs