#include <freeCam.h>

void FreeCam::pre_render() {
    if (engine->window->isKeyDown(Keys::S))
        hMove(bAngle(), 4);

    if (engine->window->isKeyDown(Keys::W))
        hMove(fAngle(), 4);

    if (engine->window->isKeyDown(Keys::A))
        hMove(lAngle(), 4);

    if (engine->window->isKeyDown(Keys::D))
        hMove(rAngle(), 4);

    if (engine->window->isKeyDown(Keys::Z))
        vMove(4);

    if (engine->window->isKeyDown(Keys::X))
        vMove(-4);

    if (engine->window->isKeyDown(Keys::Q))
        this->angle.y -=75.0f*engine->frameDelta;

    if (engine->window->isKeyDown(Keys::E))
        this->angle.y +=75.0f*engine->frameDelta;

    if (engine->window->isKeyDown(Keys::UpArrow))
        this->angle.x -=75.0f*engine->frameDelta;

    if (engine->window->isKeyDown(Keys::DownArrow))
        this->angle.x +=75.0f*engine->frameDelta;
}