OXY11 Posted June 30, 2016 Share Posted June 30, 2016 hi, now that "onPointerDown" is deprecated, how can I replace this functionality here: http://www.babylonjs-playground.com/#2FPT1A#14 using "onPointerObservable"? Quote Link to comment Share on other sites More sharing options...
Nabroski Posted July 1, 2016 Share Posted July 1, 2016 (edited) Hello this is how i explain it to myself, maybe it also helps you:http://babylonjs-playground.com/#2IDIQO#8 Good Luck Edited July 1, 2016 by Nabroski the 1th version was totaly ok. i has to be beautiful perfect JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
OXY11 Posted July 1, 2016 Author Share Posted July 1, 2016 mmm not so much Quote Link to comment Share on other sites More sharing options...
Nabroski Posted July 1, 2016 Share Posted July 1, 2016 No Problem as i said this is how i learn just copy + paste following: //replace onPointerDown with scene.onPointerObservable.add (function(evt) { var faceId = evt.pickInfo.faceId if (faceId == -1) {return;} var idx = SPS.pickedParticles[faceId].idx; var p = SPS.particles[idx]; p.color.r = 1; p.color.b = 0; p.color.g = 0; p.scale.x = 5; p.scale.y = 5; p.scale.z = 5; p.picked = true; },BABYLON.PointerEventTypes.POINTERDOWN) JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
OXY11 Posted July 1, 2016 Author Share Posted July 1, 2016 tx! 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.