Skip to content

Cursor following the mouse - Position passed to cursor from update function => conflicts #26

@Ragetto

Description

@Ragetto

From Defold forum
https://forum.defold.com/t/rendercam-defold-input-weird-cursor-position-when-scrolling/69387/6


DEFOLD INPUT (cursor)
(+ camera? not sure there is a link)

Real-time following... when not moving the mouse
When passing the "follow position" message from the input function (as recommended by Britzl), the cursor doesn't follow the mouse when this mouse doesn't move (ex: after scrolling and move moving => the mouse keeps its screen position while the cursor follow the camera movement)

What I did do to make the cursor follow the mouse no matter what?
I’ve added the message passing (to the cursor) in the update loop, which makes the cursor follow the mouse as intended... but it seems to have created some sort of “conflicts” with the other cursor’s action_ids...

Recap
When passing the "follow position" message from the update loop, the “release” input is no longer detected after I have clicked the building. I have to move the mouse to "confirm" the release and upgrade the building.


Here is a minimal version of the project here:
https://github.com/Ragetto/20211002_-PUBLIC-_defold_input_cursor

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