firefish6000

~/tmp/magnetar

Mar 11th, 2022
1,202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. diff --git a/src/workspaces.cpp b/src/workspaces.cpp
  2. index 29580bc..97776be 100644
  3. --- a/src/workspaces.cpp
  4. +++ b/src/workspaces.cpp
  5. @@ -48,11 +48,13 @@ void Workspaces::update(double delta) {
  6.  
  7.         if(xInteract.hasActiveChanged()) {
  8.             if(xInteract.isActive()) {
  9. -               startYPos = refPos.y - getOrigin().y;
  10. +               getTransform(&input, [this,refPos](vec3 pos, quat rot, vec3 scl) {
  11. +               startYPos = refPos.y - pos.y;
  12.                 snapTween.t = 1;
  13.                 for(auto &cell : cells) {
  14.                     cell->capture = false;
  15.                 }
  16. +               });
  17.             } else {
  18.                 snapTween.start = refPos.y - startYPos;
  19.                 snapTween.end = std::round(refPos.y - startYPos);
  20.  
Advertisement
Add Comment
Please, Sign In to add comment