Ignore:
Timestamp:
May 9, 2012, 1:35:04 AM (8 years ago)
Author:
sam
Message:

orbital: play with the camera.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/camera.cpp

    r1350 r1353  
    4444{
    4545    m_position = pos;
     46}
     47
     48void Camera::SetRotation(quat const &rot)
     49{
     50    m_rotation = rot;
    4651}
    4752
     
    9499    m_target += vec3(rightleft, 0, -updown) * 200.f * seconds;
    95100
    96     m_view_matrix = mat4::lookat(m_position, m_target, m_up);
     101    m_view_matrix = mat4::lookat(m_position, m_target, m_up)
     102                  * mat4(m_rotation);
    97103}
    98104
Note: See TracChangeset for help on using the changeset viewer.