Swap yaw and pitch in camera computation. Add functions to convert view matrix to camera position, and camera position to camera yaw pitch roll.
This commit is contained in:
@@ -56,10 +56,10 @@ struct Dof6ConstraintTutorial : public CommonRigidBodyBase
|
||||
virtual void resetCamera()
|
||||
{
|
||||
float dist = 5;
|
||||
float pitch = 722;
|
||||
float yaw = 35;
|
||||
float pitch = -35;
|
||||
float yaw = 722;
|
||||
float targetPos[3]={4,2,-11};
|
||||
m_guiHelper->resetCamera(dist,pitch,yaw,targetPos[0],targetPos[1],targetPos[2]);
|
||||
m_guiHelper->resetCamera(dist,yaw,pitch,targetPos[0],targetPos[1],targetPos[2]);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -614,8 +614,8 @@ public:
|
||||
virtual void resetCamera()
|
||||
{
|
||||
float dist = 10.5;
|
||||
float pitch = 136;
|
||||
float yaw = 32;
|
||||
float pitch = -32;
|
||||
float yaw = 136;
|
||||
float targetPos[3]={0,0,0};
|
||||
if (m_app->m_renderer && m_app->m_renderer->getActiveCamera())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user