mirror of
https://git.coom.tech/drummyfish/raycastlib.git
synced 2024-11-21 20:29:59 +01:00
Fix mapping
This commit is contained in:
parent
b59f44048b
commit
1d6041aff9
1 changed files with 2 additions and 2 deletions
|
@ -810,8 +810,8 @@ PixelInfo mapToScreen(Vector2D worldPosition, Unit height, Camera camera)
|
|||
(result.depth * sinInt(alpha)) / (cos == 0 ? 1 : cos); // sin/cos = tan
|
||||
|
||||
result.position.x = (a * middleColumn) / b;
|
||||
result.position.x = 2 * (middleColumn - result.position.x);
|
||||
// TODO: ^ why is this 2 here?
|
||||
result.position.x = middleColumn - result.position.x;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue