onurhanaytac Posted November 1, 2016 Share Posted November 1, 2016 Hi everyone! I want to dispose mesh on click but i am getting an error; Uncaught TypeError: Cannot read property 'processTrigger' of null I think when i am trying to dispose mesh the actionManager returns null because of there is no mesh anymore and actionManager.processTrigger returns error. What is the proper way to dispose mesh onClick? playground example: http://www.babylonjs-playground.com/#187MLU#0 Quote Link to comment Share on other sites More sharing options...
Théo Sabattié Posted November 1, 2016 Share Posted November 1, 2016 Hi', use BABYLON.ActionManager.OnPickTrigger instead of BABYLON.ActionManager.OnPickDownTrigger to prevent errors. onurhanaytac 1 Quote Link to comment Share on other sites More sharing options...
onurhanaytac Posted November 1, 2016 Author Share Posted November 1, 2016 @Théo Sabattié Thank you for your answer! It works well.. Can you tell me the difference why should i use pick instead of down or up? Quote Link to comment Share on other sites More sharing options...
Théo Sabattié Posted November 1, 2016 Share Posted November 1, 2016 On basic button, you can perform mouse down on it and mouse up out of it. -> that doesn't perform button action. Mouse down on something + mouse up on same thing = OnPickTrigger But I am not able to explain why PickDown invokes errors. :S 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.