madmuffin Posted June 7, 2016 Share Posted June 7, 2016 I looked through the examples and searched online but I can't find anyone else having ever done this to use as an example; I'm trying to hide the default computer mouse pointer and replace it with a sprite in my game that is very reactive; eg changing to different art depending on what you're mousing over or if you're giving and order or something. Does anyone have an example of this I could look at? Link to comment Share on other sites More sharing options...
glantucan Posted June 8, 2016 Share Posted June 8, 2016 I think you can deactivate the mouse crusor like this <canvas width="800" height="600" style="display: block; cursor: none;"></canvas> Then you can add an move callback to the game input manager like this game.input.addMoveCallback( function(pointer, x, y) { // pointer is the active pointer, x and y give you the position of the pointer // on the canvas so here you can position you custom cursor sprite }); Didn't test it but I think it should work Justin Luong 1 Link to comment Share on other sites More sharing options...
Recommended Posts