manim icon indicating copy to clipboard operation
manim copied to clipboard

Mouse Tracking not correctly aligned

Open DemyCode opened this issue 4 years ago • 4 comments

Describe the bug

The mouse is not aligned with the point position. When I try to use the mouse interaction the mouse is off and what is strange is that the extending or reducing the Window gives different offset for the mouse

Code:

class DummyScene(Scene):
  def construct(self):
    dot = Dot()
    dot.add_updater(lambda dot, dt : dot.move_to(self.mouse_point))

Wrong display or Error traceback: If you move the mouse you will see that it is off and changing the window size changes the offset Screenshot from 2021-05-12 23-15-39 Screenshot from 2021-05-12 23-15-39

Additional information

I also saw that by tweeking the window size you can find a certain width and height where the dot is aligned with the mouse, That might be a clue.

PS : I am also a begginer in OpenSource / online collaboration

DemyCode avatar May 12 '21 21:05 DemyCode

I had the same problem with you, and I tried to resize the window. Maybe 1280x720 is the best size, since here's the definition of Window in manimlib/window.py:

class Window(PygletWindow):
    ...
    def __init__(self, scene, size=(1280, 720), **kwargs):
        ...

widcardw avatar May 16 '21 06:05 widcardw

Is this fixed in #1529 ?

TonyCrane avatar Jun 19 '21 11:06 TonyCrane

It's not yet fixed. On my system at least, things work initially but fail once you resize the window. I can look into this a bit later.

3b1b avatar Jun 21 '21 17:06 3b1b

It's not yet fixed. On my system at least, things work initially but fail once you resize the window. I can look into this a bit later.

It also works as you said on my computer. So I just don't resize the window to avoid that.¯_(ツ)_/¯

TonyCrane avatar Jun 22 '21 00:06 TonyCrane