Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacharyPatten committed Dec 14, 2023
1 parent 43c1095 commit 8a6ce9c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Projects/First Person Shooter/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -553,11 +553,9 @@ void Render()
};

float diff = angle < fovAngleA && fovAngleA - 2f * (float)Math.PI + fov > angle ? angle + 2f * (float)Math.PI - fovAngleA : angle - fovAngleA;
//float diff = angle - fovAngleA;

float ratio = diff / fov;
int enemyScreenX = (int)(screenWidth * ratio);
int enemyScreenY = Math.Min(floor + enemySprite.Length / 2 - 1, screenHeight);
int enemyScreenY = floor;

a = (nameof(angle), angle);
b = (nameof(ratio), ratio);
Expand Down

0 comments on commit 8a6ce9c

Please sign in to comment.