unintellisense

Members
  • Content count

    3
  • Joined

  • Last visited

About unintellisense

  • Rank
    Newbie
  • Birthday
  1. Thanks, but the idea was to be able to tell in my scene callbacks if I'm over the rect (so that I exit early instead of interacting with the scene beneath my canvas). The actual interaction with the element in this case was just for debugging/demo purposes.
  2. Looks like I can achieve what I want using the actualPosition/actualSize of the Prim2DBase. http://www.babylonjs-playground.com/#1885OI#8 Not sure if I misunderstand what the .boundingInfo BoundingInfo2D property is supposed to be used for. If I inspect the center for the boundingInfo it is nowhere near the actualPosition? http://www.babylonjs-playground.com/#1885OI#9 Anyway, guess I have a way forward.
  3. 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.