Skip to content

Commit

Permalink
fixes sprite convergence when zoomed in
Browse files Browse the repository at this point in the history
  • Loading branch information
harbdog committed Jan 14, 2023
1 parent 4a6bee2 commit 90ec971
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion camera.go
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ func (c *Camera) castSprite(spriteOrdIndex int) {

if canConverge && stripe == convergenceCol && drawStartY <= convergenceRow && convergenceRow <= drawEndY {
// use pitch angle and perpendicular distance (adjusted for fov zoom) to find Z point of convergence
convergencePerpDist := spriteDist * c.fovDepth
convergencePerpDist := spriteDist
convergenceLine3d := geom3d.Line3dFromBaseAngle(c.pos.X, c.pos.Y, c.posZ, c.headingAngle, c.pitchAngle, convergencePerpDist)
convergenceDistance := convergenceLine3d.Distance()

Expand Down

0 comments on commit 90ec971

Please sign in to comment.