fix(editor): dont scale below 0.01 studs
This commit is contained in:
parent
881d09f9bc
commit
faf74cba0e
1 changed files with 4 additions and 0 deletions
|
@ -156,6 +156,10 @@ void MainGLWidget::handleHandleDrag(QMouseEvent* evt) {
|
||||||
// Find outwarwd difference
|
// Find outwarwd difference
|
||||||
localDiff = localDiff * glm::sign(draggingHandle->normal);
|
localDiff = localDiff * glm::sign(draggingHandle->normal);
|
||||||
|
|
||||||
|
// Minimum size of 0.01f
|
||||||
|
localDiff = glm::max(part->size + localDiff, 0.01f) - part->size;
|
||||||
|
diff = frame * (localDiff * glm::sign(draggingHandle->normal));
|
||||||
|
|
||||||
// Add local difference to size
|
// Add local difference to size
|
||||||
part->size += localDiff;
|
part->size += localDiff;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue