Updated Renderer
After poking at the code a bit more and looking at 3DSage's source code a little closer I was able to get rid of the fisheye warping on the floor and ceiling!
I just had to change this:
textureX = playerX + math.cos(rayAngle)*(windowHeight/2)*textureSize/distY
textureY = playerY + math.sin(rayAngle)*(windowHeight/2)*textureSize/distY
into this:
textureX = playerX + math.cos(rayAngle)*(windowHeight/2)*textureSize/distY/math.cos(lineCorrection)
textureY = playerY + math.sin(rayAngle)*(windowHeight/2)*textureSize/distY/math.cos(lineCorrection)
New code has been uploaded in place of the old. Everything else remains the same.
Get 3DSage's Raycaster in LOVE2D 11.4 + SOURCE
3DSage's Raycaster in LOVE2D 11.4 + SOURCE
Made from 3DSage's video tutorial it's a functioning Raycaster for Love2D!
More posts
- Small update - Better RendersJul 30, 2023
- Small Update - Texture GapsMay 22, 2023
- Added Textures and a map!May 20, 2023
Leave a comment
Log in with itch.io to leave a comment.