Fixed ray angles not being updated properly