File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -296,16 +296,16 @@ void ofEasyCam::updateTranslation(){
296
296
if (getOrtho ()){
297
297
// In ortho mode moving along the z axis has no effect besides clipping.
298
298
// Instead, scale is applied to achieve the effect of getting near or far from the target.
299
- glm::vec3 mousePre ;
299
+ glm::vec3 mousePre;
300
300
bool bDoScale = (currentTransformType == TRANSFORM_SCALE || currentTransformType == TRANSFORM_TRANSLATE_Z);
301
301
if (bDoScale) {
302
- mousePre = screenToWorld (glm::vec3 ((bIsScrolling?mouseAtScroll:lastPressMouse),0 ));
302
+ mousePre = screenToWorld (glm::vec3 ((bIsScrolling?mouseAtScroll:lastPressMouse),0 ), viewport );
303
303
}
304
304
move (glm::vec3 (lastPressAxisX * translate.x ) + (lastPressAxisY * translate.y ));
305
305
if (bDoScale) {
306
306
setScale (getScale () + translate.z );
307
307
// this move call is to keep the scaling centered below the mouse.
308
- move (mousePre - screenToWorld (glm::vec3 ((bIsScrolling?mouseAtScroll:lastPressMouse),0 )));
308
+ move (mousePre - screenToWorld (glm::vec3 ((bIsScrolling?mouseAtScroll:lastPressMouse),0 ), viewport ));
309
309
}
310
310
}else {
311
311
move (glm::vec3 (lastPressAxisX * translate.x ) + (lastPressAxisY * translate.y ) + (lastPressAxisZ * translate.z ));
You can’t perform that action at this time.
0 commit comments