Event 'mousemove' is invoked on ElementComponent, with useInput set to true, when mouse is outside the element but previously LMB was pressed inside this element. Works correctly on engine version 1.55.0.
const TestMouse = pc.createScript('testMouse');
TestMouse.attributes.add('status', { type: 'entity' });
TestMouse.attributes.add('target', { type: 'entity' });
TestMouse.prototype.initialize = function() {
this.isOver = false;
this.targetElement = this.target?.element;
if (!this.targetElement) return;
this.targetElement.on('mouseenter', this.onEnter, this);
this.targetElement.on('mouseleave', this.onLeave, this);
this.targetElement.on('mousemove', this.onMove, this);
};
TestMouse.prototype.update = function() {
this.status.element.text = 'Over UI: ' + this.isOver;
};
TestMouse.prototype.onEnter = function() {
this.isOver = true;
};
TestMouse.prototype.onLeave = function() {
this.isOver = false;
};
TestMouse.prototype.onMove = function() {
this.isOver = true;
};
Description
Event 'mousemove' is invoked on ElementComponent, with useInput set to true, when mouse is outside the element but previously LMB was pressed inside this element. Works correctly on engine version 1.55.0.
Steps to Reproduce