Any Fisheye Solutions?

Im making a Raycaster Fps, and I don’t know how to get rid of the Fisheye effect, but I know it’s possible using Cosin, but I need the formula to apply it to my game (here is my game:One man Army )

1 Like

The Fisheye affect is actually how the Flowlab Raycast detects distance on hit.
Its more explained in this comment, but overall Flowlab’s Raycasts aren’t precise enough.

raycaster games - #10 by TinkerSmith

2 Likes

Thank you for the information, but
I’ll still try to find a way to get rid of it. Thx

1 Like

Man this coding is so cool :sweat_smile:
I’m just waiting until I get to this level :grin:

3 Likes

You are on the right track with cosine. I’m on the phone, so can’t do anything, but this link might help:
https://www.permadi.com/tutorial/raycast/rayc8.html

Also check my other tinkers, I think in the laser beam one I had a routine that gets the approximate ‘real’ distance to the wall. But it’s cumbersome.

Live Long and Tinker

4 Likes

thank you so much!!! :grin:

4 Likes

No worries, I hope it helps. Still some tinkering involved, but possible :wink:

4 Likes