Mousemove event clientX and clientY randomly are set to 0 while clicking

Describe the bug:
e.clientX and e.clientY in mousemove js events sometimes return 0, even if it is not right.

How do you cause this bug?

  • List the steps
    1.Create a widget.
    2.Add the line/function:
document.addEventListener('mousemove',(e) => { 
    if (e.clientX == 0 && e.clientY == 0) {

3.Hit F5 and go into preview
4.Click a couple of times.
5.See how the mousemove event sometimes randomly returns 0 for clientX and clientY after a click.

Screenshots / video of bug:

Which platform: PC

Which input: mouse

Your Crayta username: daigoro

Game seen in (including “Hub” or “Editor for XYZ”):
Entity Duplication Bug (but also works in any other game)

How regularly do you see this? (E.g. 2/3 times - please try 3 times if possible):
10/27 clicks

Version number (found in Help tab in Settings):

1 Like

Hey there @Ya_shi_shi!

Thank you for adding the script and video on where to place it - would of been lost without it! :laughing:
I have opened up a ticket for this issue so our internal team can investigate this issue.

1 Like