jroosterman Posted July 12, 2017 Share Posted July 12, 2017 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? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 12, 2017 Share Posted July 12, 2017 Hello and welcome just call scene.detachControl() when leaving the scene and scene.attachControl() when entering Quote Link to comment Share on other sites More sharing options...
jroosterman Posted July 12, 2017 Author Share Posted July 12, 2017 Thanks, that worked. As a note I also had to do camera.attachControl() as well, otherwise my camera would move. 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.