skalibran Posted October 25, 2015 Share Posted October 25, 2015 Hey there,I found a way to get the current location of a mouse on click:https://github.com/BabylonJS/Babylon.js/wiki/11---Picking-collisionsIs there a way to get constant position data of the mouse? Not only when I click on something?Thanks! Quote Link to comment Share on other sites More sharing options...
iiceman Posted October 25, 2015 Share Posted October 25, 2015 Hey there, the same way like on click just by using the mousemove event: http://www.babylonjs-playground.com/#NPOXNwindow.addEventListener("mousemove", function () { // We try to pick an object var pickResult = scene.pick(scene.pointerX, scene.pointerY);}); Quote Link to comment Share on other sites More sharing options...
skalibran Posted October 25, 2015 Author Share Posted October 25, 2015 Awesome, thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.