Search the Community
Showing results for tags 'mousewheel'.
Found 4 results
Hi gang! Once before, I tried adding mousewheel to FreeCamera. I try again, for fun. http://playground.babylonjs.com/#6FHKHC#7 Watch console. Working okay, so far. But, you know, I would like mousewheel to move camera along direction vector returned-from scene.activeCamera.getDirection(BABYLON.Axis.Z) Currently, mousewheel moves camera along worldspace Z axis. If someone could fix line 33, so that camera moves along dir.z axis, that would be swell. Thanks! For a longer-term solution, does anyone think it would be wise/useful... to add babylon.freeCameraMouseWheelInput.ts to this list: https://github.com/BabylonJS/Babylon.js/tree/master/src/Cameras/Inputs ? The way I am using... is small and works pretty good, but it is not using the camera inputs system. Maybe it should? *shrug* Comments welcome on that. thx.
Hello there! On my portfolio website, I'm using a Babylon scene as a splash page: https://rocketclowns.com/ When the user hovers their mouse over the Babylon scene, mousewheel events don't reach the parent, so users can't use their mouse to scroll down. Is there a way to propagate the mousewheel events to restore normal scrolling behaviour on the page? Many thanks in advance
Hi, I tried a lot of ways but didn't find a good one (even on the forum didn't find). I have a world with bounds (wider than what my camera can see) and have a mouse listener so when player hit an edge it moves the camera if we are not touching world bounds, that's ok. I have a function to scale the world when user uses his mousewheel, works perfectly. I have some sprites fixedToCamera to get an UI. But when the player zooms in or out, UI scales too, and of course I don't want it to scale. I tried to scale world or camera, I tried to revert the scale on thoses sprites but no success. I really need to scale the world to let the player move around with camera, I need a "real" zoom in/out and let the player continue moving with the camera when zoomed in/out. edit : I hope I don't have to handle it externaly to Phaser (pure js and css) ?! Thx
eggborne posted a topic in Pixi.jsI would like to be able to refer to cursor.position.x and cursor.position.y the way I refer to sprite.position.x, etc., and be able to handle mousewheel events the way mousedown, mouseover, and the other built-in Pixi functions do. Basically I am trying to achieve a sprite which rotates to point at the cursor, and can be moved with WASD. I know jQuery can do things like this, but would using it (or another library) be overkill if it were just for this purpose, and only saved a few lines of code? If someone could give me some advice and/or point me in the right direction, I would greatly appreciate it.