Skip to content

mouseY system variable eventually stops working #7392

Open
@HectorDev309

Description

@HectorDev309

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

v1.9.4 May 21, 2024

Web browser and version

Firefox 115.17.0esr

Operating system

Windows 7

Steps to reproduce this

I don't know what exactly causes this, but the mouseY system variable eventually starts returning floating numbers making no sense with the current mouse Y position.

I coded a simple program that shows the current mouseY value and it works properly, but if you make a full project it works for a short period and eventually starts showing incoherent results until you rerun the program, but it keeps happening again and again.

I had this problem with two projects of mine, I couldn't notice any similarity between then that could be causing this problem, but I will try to find something while I wait for a answer.

With one of those projects I managed to avoid this issue by creating a new variable for the mouse Y position and using movedY to change the value of the variable, it worked, but the mouseY variable would be more reasonable.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions