bug fixes to ray casting, changed camera usage