raygame/Actor.cpp
//Gets the movement from the player

Gets the movement from the player
Gets the movement from the player
void Actor:: getMovement(float deltaTime)
{
    if (IsKeyDown(KeyboardKey(KEY_W)))
    {
        setAcceleration(getForward() * 1 * deltaTime);
    }
    else if (IsKeyDown(KeyboardKey(KEY_D)))
    {
        rotate(-3 * deltaTime);
    }
    else if (IsKeyDown(KeyboardKey(KEY_A)))
    {
        rotate(3 * deltaTime);
    }
    else
    {
        setAcceleration({ 0, 0 });
        if (m_velocity.x > .1)
        {
            m_velocity.x -= 100 * deltaTime;
        }
        else if (m_velocity.x < -.1)
        {
            m_velocity.x += 100 * deltaTime;
        }
        if (m_velocity.y > .1)
        {
            m_velocity.y -= 100 * deltaTime;
        }
        else if (m_velocity.y < -.1)
        {
            m_velocity.y += 100 * deltaTime;
        }
    }
}
void Actor :: getMovement ( float deltaTime ) { if ( IsKeyDown ( KeyboardKey ( KEY_W ) ) ) { setAcceleration ( getForward ( ) * 1 * deltaTime ) ; } else if ( IsKeyDown ( KeyboardKey ( KEY_D ) ) ) { rotate ( -3 * deltaTime ) ; } else if ( IsKeyDown ( KeyboardKey ( KEY_A ) ) ) { rotate ( 3 * deltaTime ) ; } else { setAcceleration ( { 0 , 0 } ) ; if ( m_velocity . x > .1 ) { m_velocity . x -= 100 * deltaTime ; } else if ( m_velocity . x < -.1 ) { m_velocity . x += 100 * deltaTime ; } if ( m_velocity . y > .1 ) { m_velocity . y -= 100 * deltaTime ; } else if ( m_velocity . y < -.1 ) { m_velocity . y += 100 * deltaTime ; } } }
Gets the movement from the player
Gets the movement from the player
//Used to set the player looking up
 //Rotates the player
 //slow down ship
