Get rid of Fisheye effect

Hey, I can’t get rid of the fisheye effect because for some reason, the cosine is in radian, and when I change it to degrees, it’s still not working. How can I fix that?

1 Like

The raycasts don’t output the correct distance which makes it very very hard to get rid of the fisheye effect. Flowlab calculates cos, sin, and tan with radians so you need to input radians, not degrees. It not working with radians most likely has nothing to do with the coding, but probably with raycasts not outputting the correct distance.
(Btw to convert degrees to radians use “(Degree)*Math.PI/180”

I’m looking into Wolfenstein myself, so if I figure something out I’ll tell you.

Also, JR/DraftyScience might have more of an idea on this topic than me because I only started working Wolfenstein recently

1 Like