Flashlight

This commit is contained in:
4VRDriver
2020-09-06 22:53:17 +02:00
parent 1442d81549
commit 4cba3da667
4 changed files with 22 additions and 5 deletions

View File

@@ -65,6 +65,7 @@ void Camera::updateDirectionFromMouseInput(float deltaCursorX, float deltaCursor
if(pitch < -89.0f)
pitch = -89.0f;
glm::vec3 direction;
direction.x = cos(glm::radians(yaw)) * cos(glm::radians(pitch));
direction.y = sin(glm::radians(pitch));
direction.z = sin(glm::radians(yaw)) * cos(glm::radians(pitch));