JakeCake Posted August 15, 2014 Share Posted August 15, 2014 Whatever I try, game.input.activePointer.movementX and game.input.activePointer.movementY always returns 0. Am I wrong to assume that they should return the distance the pointer has moved since the last frame? rawMovementX & Y does the same thing by the way. Any solution, have I forgot to enable something? Docs are not to much help on this one. Link to comment Share on other sites More sharing options...
lewster32 Posted August 15, 2014 Share Posted August 15, 2014 These values are for when the mouse is locked with Mouse.requestPointerLock; I think you'd have to roll your own delta routine to get the distance the pointer has moved, though it's pretty trivial to do - just save the position, then each frame compare the current position with the previously saved one to get your difference. Link to comment Share on other sites More sharing options...
JakeCake Posted August 15, 2014 Author Share Posted August 15, 2014 I have just made a delta system. As you said, it's quite trivial to make one, didn't take much longer than writing this topic, but I was mostly just curious about the function, since I couldn't get it to work no matter what I did. I will mark your answer as accepted, thank you, and then read up on the requestPointerLock to see if it's something I can perhaps use in some other project. Link to comment Share on other sites More sharing options...
Recommended Posts