[ADD] load bee in scene

This commit is contained in:
Nathalie Seen
2021-06-04 10:01:13 +02:00
parent 739b4a9eb6
commit c25efec103
8 changed files with 21703 additions and 17 deletions

View File

@@ -10,6 +10,8 @@ namespace entities
void Camera::Move(GLFWwindow* window)
{
float movement_speed = 0;
float up_down_speed = 0;
float side_speed = 0;
if (glfwGetKey(window, GLFW_KEY_W) == GLFW_PRESS)
{
@@ -23,28 +25,21 @@ namespace entities
if (glfwGetKey(window, GLFW_KEY_D) == GLFW_PRESS)
{
rotation.y += ROT_SPEED;
side_speed += SPEED;
}
if (glfwGetKey(window, GLFW_KEY_A) == GLFW_PRESS)
{
rotation.y -= ROT_SPEED;
side_speed -= SPEED;
}
if (glfwGetKey(window, GLFW_KEY_SPACE) == GLFW_PRESS)
{
rotation.x -= ROT_SPEED;
up_down_speed += UP_SPEED;
}
if (glfwGetKey(window, GLFW_KEY_LEFT_SHIFT) == GLFW_PRESS)
{
rotation.x += ROT_SPEED;
}
float dx = glm::cos(glm::radians(rotation.y + 90)) * movement_speed;
float dz = glm::sin(glm::radians(rotation.y + 90)) * movement_speed;
position.x += dx;
position.z += dz;
position.x += side_speed;
position.z += movement_speed;
position.y += up_down_speed;
}
}