basic raycasting example youll notice that detection gets worse the farther the ray is thats intentional, giving optimal speeds and decent collision thats really good up close press "s" to change varyables set quality to 0 for smth cool more on raycasting at http://lodev.org/cgtutor/raycasting.html