I'm trying to draw one line where it's end follows the mouse. Whenever I click there is a huge offset between the mouse pointer and the line end. I assume the coordinates are based on the screen coordinates rather than the window coordinates.
var pointer = this.input.activePointer;
if(pointer.isDown) {
line.setTo(0,0, pointer.x, pointer.y)
}
Update: The offset is of 100px (horizontal and vertical), any resolution screen. But I don't know why.