case WM_MOUSEMOVE:
if(GetCapture() == hWnd) {
int X = GET_X_LPARAM(lParam);
int Y = GET_Y_LPARAM(lParam);
xAngle += (Y-mouseDownPt.y) / 3.6;
yAngle += (X-mouseDownPt.x) / 3.6;
InvalidateRect(hWnd, NULL, FALSE);
mouseDownPt.x = X;
mouseDownPt.y = Y;
}
return 0;
}
마우스 이동할때 회전부 인데있자나
상이 똑바로 서있을 때는 잘 되는데
상이 거꾸로 서있을 때는
yAngle += (X-mouseDownPt.x) / 3.6; 를
yAngle -= (X-mouseDownPt.x) / 3.6; 로 바꿔줘야 될거같아
거꾸로 돌거든
조건문 써서 하려고 하는데
상이 똑바로 서있는지 상이 거꾸로 서있는지 어떻게 알까?
댓글 0