Bugfix depth

This commit is contained in:
brunoherbelin
2020-05-18 22:35:53 +02:00
parent 3b9b593aa2
commit e3e212d11b
2 changed files with 2 additions and 2 deletions

View File

@@ -409,7 +409,7 @@ void LayerView::grab (glm::vec2 from, glm::vec2 to, Source *s, std::pair<Node *,
sourceNode->translation_ = start_translation + gl_Position_to - gl_Position_from;
// diagonal movement only
sourceNode->translation_.x = CLAMP( sourceNode->translation_.x, -10.f, 0.f);
sourceNode->translation_.x = CLAMP( sourceNode->translation_.x, SCENE_DEPTH + 2.f, 0.f);
sourceNode->translation_.y = sourceNode->translation_.x / aspect_ratio;
// change depth

View File

@@ -23,7 +23,7 @@
#define EUCLIDEAN(P1, P2) sqrt((P1.x() - P2.x()) * (P1.x() - P2.x()) + (P1.y() - P2.y()) * (P1.y() - P2.y()))
#define SCENE_UNIT 5.f
#define SCENE_DEPTH -10.f
#define SCENE_DEPTH -12.f
#define CIRCLE_SQUARE_DIST(x,y) ( (x*x + y*y) / (SCENE_UNIT * SCENE_UNIT * SCENE_UNIT * SCENE_UNIT) )
#define IMGUI_TITLE_MAINWINDOW ICON_FA_CIRCLE_NOTCH " vimix"