unintellisense Posted October 29, 2016 Share Posted October 29, 2016 Hello, I am trying to work out how I can use scene.pointerX/scene.pointerY to determine when my cursor is over a specific canvas2D rectangle. I made a small playground to show what I am trying to do. http://www.babylonjs-playground.com/#1885OI#6 The intention is for it to only toggle the box's color when clicking over it, but you can see that doesn't happen. What I really want this for is so that I can use a full size ScreenSpaceCanvas2D and be able to return early from my scene pointer actions if it is over specific rectangles. I tried scaling down the screen canvas to the size of the actual menu, but then I ran into the issue of scaling the menu properly in a way that behaves the same way the margin values do for a rectangle. Anyway, a bit new to Babylon.js, any help is appreciated. Quote Link to comment Share on other sites More sharing options...
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.