Managed to sort out the casting error. Turns out I needed to work with points and had problems due to vector splicing. New bug is that camera rotation doesn t work as intended