23.07.2010, 19:25
Quote:
This function uses RedShirt's "DistanceCameraTargetToLocation" and modified GetPlayerFacingAngleToPoint, which I have altered to GetPointAngleToPoint.
When you want to detect, if a player is aiming at any position, you don't need only camera pos and camera front vector, since the crosshair position is not correlating the camera vector. I've set the function IsPlayerAimingAt so it reflects all angle (both horizontal and vertical) differences upon the weapons. And this one should reliably detect a headshot (I haven't tested this one though). |