light_raycasting
light_raycasting copied to clipboard
Fix problem with angle resetting at 360 degrees
when vertex closing current wall is in LL quadrant and checked-against corners are in LR quadrant (their angle is not less than max_angle because we 'reset' angle at 260 degrees) or vertex opening current wall is in LR quadrant and corner is in LL quadrant (its angle is larger than in_angle (see update_light_polygon method) in filter builtin, ray is shot which should not be! (temporary fix: replace filter() wit raw rays list (slow!)
The problem "flips" 360 degrees when % 360 is deleted from calculate_angle method.
Picture depicts the problem: