alexoy Posted March 31, 2018 Share Posted March 31, 2018 Hello! Probably I've found a bug with ActionManager and it's intersection triggers. In my case there is a bigger container, smaller mesh inside it and a sphere which moves through them. PG demo: https://playground.babylonjs.com/#6CY2EU#1 If you check the console - you will notice that inner mesh's OnIntersectionEnter is triggered only once, while bigger container's OnIntersectionExit triggers every time. Expected result: both Enter and Exit triggers are fired every time. NOTE: if you make both triggers the same (OnIntersectionExitTrigger or OnIntersectionEnterTrigger) - everything is fine, so something is wrong with opposite/different triggers. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted March 31, 2018 Share Posted March 31, 2018 Weird weird weird. Interesting find, A! https://playground.babylonjs.com/#6CY2EU#4 There, consistent box2 onEnter trigs, looks good. Now activate lines 51-57 (highlight then control /)... activate an onExit for box 1. Run. After that, the box2 onEnter.... works only once. hmm. hmmmmmmm. :/ So, registering onExit for box1... kills onEnter for box2. Weird. CORE DIVE! Weee... https://github.com/BabylonJS/Babylon.js/blob/master/src/Actions/babylon.actionManager.ts I've already verified that sphere.actionManager.actions array contains two actionObjects, consistently. [pg#5] I thought maybe the addition-of the box1 exitAct (type 13)... somehow pushed box2 enterAct (type 12)... out-of the array. But no, it seems fine. More diving! Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 2, 2018 Share Posted April 2, 2018 Hi alexoy/others. No news... but... I inserted BJS ActionManager code... into playground... for easier testing. https://playground.babylonjs.com/indexstable#6CY2EU#7 See line 677 (true/false make-it-fail switch) Symptom: Register an onExit for outer box1, and onEnter for inner box2... works only one time. (Wingnut, chewing on a stick match, spins the barrel on his chrome bug-shootin' revolver and sternly peeks-out from under his hat brim. The bugs don't know that it's just a cap gun.) Currently accepting applications for posse members! Quote Link to comment Share on other sites More sharing options...
Guest Posted April 2, 2018 Share Posted April 2, 2018 Clearly a bug..On it! Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted April 2, 2018 Share Posted April 2, 2018 Fixed! Will be in next nightly Wingnut 1 Quote Link to comment Share on other sites More sharing options...
alexoy Posted April 2, 2018 Author Share Posted April 2, 2018 6 hours ago, Wingnut said: for easier testing ... 6 hours ago, Wingnut said: See line 677 Funny first thought Thanks, one more bug solved! Wingnut and GameMonetize 2 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.