You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error when dragging an object outside the game area, if the object is constrained and the object is on top of another interactive object.
In my testing, this did not occur when the game object was not constrained, and it did not occur when it was not on top of another interactive object. I discovered this when trying to create a volume slider for my game, for which the slider knob was constrained to the slider area.
Although it does not crash the game, the error shows up on console.
Steps to reproduce (using test code below):
Click the green box and begin dragging it
Keep dragging until the mouse pointer is outside the game area (e.g. in the white area of the page background)
Release the mouse button
Console will show:
Uncaught TypeError: Cannot read property 'renderList' of undefined
at initialize.sortGameObjects (phaser.min.js:1)
at initialize.processOverOutEvents (phaser.min.js:1)
at initialize.update (phaser.min.js:1)
at initialize.updateInputPlugins (phaser.min.js:1)
at initialize.onMouseUp (phaser.min.js:1)
at onMouseUpWindow (phaser.min.js:1)
This appears to be because the camera associated with the pointer is undefined when the event takes place outside the game area.
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.
Version
Description
Error when dragging an object outside the game area, if the object is constrained and the object is on top of another interactive object.
In my testing, this did not occur when the game object was not constrained, and it did not occur when it was not on top of another interactive object. I discovered this when trying to create a volume slider for my game, for which the slider knob was constrained to the slider area.
Although it does not crash the game, the error shows up on console.
Steps to reproduce (using test code below):
This appears to be because the camera associated with the pointer is undefined when the event takes place outside the game area.
Example Test Code
https://codepen.io/lyger-zero/pen/PopNKbM
Additional Information
The text was updated successfully, but these errors were encountered: