Simple raycast test.

1


Thank you, I will be using this later in my games for line of sight

2


be aware that your current code is quite slow - there is no need to iterate over pixels to find a hit, this should be done in grid space - suggest to look at how a typical raycasting engine solves that.
example: https://www.permadi.com/tutorial/raycast/rayc7.html



Thank you @freds72 for taking the time to check the code and suggest better way of doing it!
I will try to understand it. Hopefully it won't be beyond my capabilities to implement :)


.jpg)
Hi,nice implementation! I did one a while ago, i don't which one is more suitable though: https://www.lexaloffle.com/bbs/?tid=49151
[Please log in to post a comment]