FPS camera Hello. I'm reading learnopengl_fps_camera and i don't understand Euler angles from it. It says that: 1) direction.y = sin(glm::radians(pitch)); it's clear. 2) direction.x = cos(glm::radians(pitch)); direction.z = cos(glm::radians(pitch)); It's not clear why x and z are changed equally. What if we look at only one axis? 3) direction.x = cos(glm::radians(pitch)) * cos(glm::radians(yaw)); direction.y = sin(glm::radians(pitch)); direction.z = cos(glm::radians(pitch)) * sin(glm::radians(yaw)); Why multiplication? https://ift.tt/eA8V8J
Hello. I'm reading learnopengl_fps_camera and i don't understand Euler angles from it. It says that: 1) direction.y = sin(glm::radians(pitch)); it's clear. 2) direction.x = cos(glm::radians(pitch)); direction.z = cos(glm::radians(pitch)); It's not clear why x and z are changed equally. What if we look at only one axis? 3) direction.x = cos(glm::radians(pitch)) * cos(glm::radians(yaw)); direction.y = sin(glm::radians(pitch)); direction.z = cos(glm::radians(pitch)) * sin(glm::radians(yaw)); Why multiplication?
from GameDev.net https://ift.tt/2V7Gd32
from GameDev.net https://ift.tt/2V7Gd32
ليست هناك تعليقات