jhagg Posted May 1, 2015 Share Posted May 1, 2015 Hi there I'm trying to build a game where flies attack a piece of floating poo. Mature, I know I want the poo body to always be underneath the mouse, and if I start the game with my mouse already moving it will be underneath it, but if I load the page and then put my mouse into the viewport it will move the poo body relative to the cursor. Is there a common pattern for having something follow the mouse exactly? https://jsfiddle.net/obzm5jzf/ Link to comment Share on other sites More sharing options...
Noid Posted May 2, 2015 Share Posted May 2, 2015 Instead of adding the movement of the mouse to the position of the poo, can't you just do "poo.position = game.input.activePointer.position;"? Link to comment Share on other sites More sharing options...
Recommended Posts