Skip to content
Snippets Groups Projects

Resolve "Kamera - Erstellung und Handling"

Merged Ghost User requested to merge 35-kamera-erstellung-und-handling into develop
2 files
+ 18
24
Compare changes
  • Side-by-side
  • Inline
Files
2
  • d54f0064
    [#35][Fix] remove setting of camera pos and front · d54f0064
    Sebastian Gaida authored
    removed camera pos and front and used temp vars to hold it till lookAt is called
@@ -90,12 +90,10 @@ namespace vkcv {
}
void Camera::setPosition( glm::vec3 position ){
// Syntax: Mat[column][row]
// project new position into camera coordinates
m_view[3] = glm::vec4(0.0f,0.0f,0.0f,1.0f); // loescht Position_cam aus Viewmatrix
glm::mat4 translation = glm::mat4(1.0f); // erzeugt Einheitsmatrix
m_view[3] = glm::vec4(0.0f,0.0f,0.0f,1.0f);
glm::mat4 translation = glm::mat4(1.0f);
translation[3] = glm::vec4(-position, 1.0f);
m_view = m_view * translation; // Viewmatrix = View * Translation
m_view = m_view * translation;
}
void Camera::movePosition( glm::vec3 translation ){
Loading