type to object
moved camera direction code to own method