[Plib-users] Problem with sgHPRfromVec3
Brought to you by:
sjbaker
From: Troy Y. <tro...@ho...> - 2000-08-16 03:05:56
|
I saw a post about this before (I think in the plib-devel list) but didn't see any response to confirm the problem. I found that I had to do the following when I tried to use sgHPRfromVec3() to set my camera to look at a the desired point. sgSetVec3(lLookFrom, lX, lY, lZ); sgSubVec3(lLookDir, gLookAt, lLookFrom); sgHPRfromVec3(lLookHPR, lLookDir); /* Seems to be an error in sgHPRfromVec3(). // Need to change pitch sign to get correct result. */ lLookHPR[1] *= -1.0; /* set up the camera */ sgSetCoord(&lCameraPos, lLookFrom, lLookHPR); Am I doing something wrong or is there really a problem? I've been using v1.1.11 - was it a problem that has been fixed? (I've upgraded to v1.2.0 but don't recall a change in behaviour - I'll have to check to be sure I recompiled though). Thanks for any help, Troy. |