Skip to content

How to get a precise position of the widget #11

@Emafire003

Description

@Emafire003

Hi, I'm trying to make this widget disapper whenever it gets enough distance from the center. The problem is that when getting the position from the dragcontroller it oftern unreliable. The way i'm doing is: Getting the first position the first time the widget is built, and save it to a startPos variable. Then, every time the widget is dragged (checking with onPointerMove) I get the position again with getCurrent position. The new position that i'm getting often varies a lot even if the widget is placed in the exact same spot, like setting it to the topleft. Like one time the first value of the offset is 144, and the when i do it again it's 90 or even 0.0. Any ideas on how to resolve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions