jroosterman

Members
  • Content count

    7
  • Joined

  • Last visited

  1. I set up an OnKeyDownTrigger Action for my scene. scene.actionManager = new BABYLON.ActionManager(scene); scene.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnKeyDownTrigger, keyDownAction)); ... var keyDownAction = function (evt) { if (evt.sourceEvent.keyCode == 37) { evt.getSceneSomehow().doSomethingWithScene(); } else if (evt.sourceEvent.keyCode = 39) { evt.getSceneSomehow().doSomethingELSEWithScene(); } }; In the keyDownAction I want to get a reference to the scene that registered the action. Can I do this?
  2. OnPointerOverTrigger Triggers through other meshes

    Thanks, I'll give that a shot.
  3. I have a group of meshes that have OnPointerOverTrigger events. When I mouse over them the event triggers. However, when I mouse over them while they are behind another object that has no events, the OnPointerOverTrigger still triggers. Is there a simple way to make OnPointerOverTrigger not trigger when the mesh is behind another mesh?
  4. Switching Scenes does not disable click events

    Thanks, that worked. As a note I also had to do camera.attachControl() as well, otherwise my camera would move.
  5. I am working on a project that switches between a handful of scenes. To do this I load all of my scenes at the start so you can switch between them quickly. You start out in an overall view of the area and you can click markers to go into rooms. In the rooms are more makers that are hooked up to click events. However If one of the markers in the scene is in the bottom left of the screen per say and I move to a different scene, If I would click in the bottom left of the screen the click event of the previous room triggers. How do I make sure that click events are only active for the currently active scene?