You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.
Currently, view-position and shoot-position are coupled together and calculated by Unit_GetHeadPosition, which is correct for neither. The shoot-position should be where the bullets/projectiles originate, and the view position is where the camera you see through is located.
The shoot direction from the shoot pos is calculated, as far as I can tell, by:
Vector view_pos = ...;
Vector view_dir = ...;
// this may be overridden to an enemy pos if you're looking roughly at them i think
Vector aim_at = TraceFrom(view_pos, view_dir).HitPos;
Vector shoot_pos = ...;
Vector shoot_dir = (aim_at - shoot_pos).Normal();
This is what is responsible for all third-person weapons aiming too high, and, if it remains coupled, will cause a disparity between the calculated projectile impact time and actual projectile impact time. The larger the difference betwen view_pos and shoot_pos, the larger the disparity.
The text was updated successfully, but these errors were encountered:
Currently, view-position and shoot-position are coupled together and calculated by
Unit_GetHeadPosition
, which is correct for neither. The shoot-position should be where the bullets/projectiles originate, and the view position is where the camera you see through is located.The shoot direction from the shoot pos is calculated, as far as I can tell, by:
Vector view_pos = ...; Vector view_dir = ...; // this may be overridden to an enemy pos if you're looking roughly at them i think Vector aim_at = TraceFrom(view_pos, view_dir).HitPos; Vector shoot_pos = ...; Vector shoot_dir = (aim_at - shoot_pos).Normal();
This is what is responsible for all third-person weapons aiming too high, and, if it remains coupled, will cause a disparity between the calculated projectile impact time and actual projectile impact time. The larger the difference betwen
view_pos
andshoot_pos
, the larger the disparity.The text was updated successfully, but these errors were encountered: