Dad72 Posted March 10, 2016 Share Posted March 10, 2016 Hello, When the mouse is released following the event "pointerup", the camera is attached to the pointer of mouse. Seems to be related to changes added by Camera.ForceAttachControlToAlwaysPreventDefault() (I suppose). The camera.detachControl() is not working as expected now. Thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 10, 2016 Share Posted March 10, 2016 PG? (I don't think I can do shorter :)) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 10, 2016 Author Share Posted March 10, 2016 Ok. Try to move the sphere and release the mouse. http://www.babylonjs-playground.com/#1UIC0D#0 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 10, 2016 Share Posted March 10, 2016 I mean: can you reproduce it without the edit control? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 11, 2016 Author Share Posted March 11, 2016 Ok, with demo official of Babylon. http://www.babylonjs-playground.com/#1ITSXW Compilation error Cannot read property 'removeEventListener' of undefined Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 11, 2016 Share Posted March 11, 2016 I do not see this error on my browsers Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 11, 2016 Share Posted March 11, 2016 But the behaviour is odd I agree.. I'll check this Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 11, 2016 Author Share Posted March 11, 2016 essaye de cliquer sur un cube et de le déplacer puis relâcher la souris et de déplacer la souris et un cube a nouveau. ou essaye de cliquer sur run, j'ai eu cette erreur après. (elle semble aléatoire celle la) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 11, 2016 Share Posted March 11, 2016 I'll fix it soon Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 11, 2016 Author Share Posted March 11, 2016 ok, Thanks DK Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 11, 2016 Author Share Posted March 11, 2016 I do not know if this was correct but if I add a camera.attachControl(canvas, true); I error : Cannot read property 'addEventListener' of undefined http://www.babylonjs-playground.com/#1PZRYL else if comment //camera.attachControl, I error: Cannot read property 'dispose' of undefined If we click on Run 2 times, same thing was a mistake with 'dispose' http://www.babylonjs-playground.com/#1PZRYL#1 I use Google Chrome Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 11, 2016 Share Posted March 11, 2016 refresh your cache..No issue on my side Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 12, 2016 Author Share Posted March 12, 2016 J'ai vider les caches (3 fois pour être sûr) et si je clique 2 fois sur Run. l'erreur "dispose" est présent avec Chrome. avec Firefox en cliquand sur Run j'ai this._gamepads is undefined et avec ce lien, sur Chrome j'ai l'erreur addEventListener (les caches sont aussi re-vider): http://www.babylonjs-playground.com/#1PZRYL#2 (avant les 2 liens du dessus arrivait sur #1PZRYL#1). avec Firefox j'ai e is undefined Et sur ce lien: http://www.babylonjs-playground.com/#1UIC0D#0 l'erreur est toujours présente et n'exister pas avec les versions précédente d'y a 4 jours, donc l'erreur n'est pas avec EditorControl puisque ca fonctionner parfaitement bien avant. Si on regarde cette démo, cela fonctionne avec la versions précédente de Babylon: http://ssatguru.appspot.com/babylonjs/EditControl/webapp/index.html Je pense qu'il y a vraiment un souci Deltakosh, je l'invente pas. je ne pense pas que c’est une question de cache. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 13, 2016 Share Posted March 13, 2016 OK I missed some bugs here:) - http://www.babylonjs-playground.com/#1PZRYL#2 : * this._gamepads is undefined: Fixed! It was an issue introduced by the new input mechanism * addEventListener error: It was because the canvas was defined AFTER the call to attachControl. Here is a simple fix: http://www.babylonjs-playground.com/#1WZES2#0 For http://www.babylonjs-playground.com/#1UIC0D#0 , I cannot help without a simpler PG. I cannot debug through all the code at the top of the PG Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 13, 2016 Author Share Posted March 13, 2016 Thanks DK. I will try to see how to reproduce the bug otherwise for EditorControl that worked before. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 13, 2016 Author Share Posted March 13, 2016 I managed to reproduce the bug DK. That this produce with the use of a freeCamera. Try to move an object and releasing the mouse, then the camera bug. It does not seem to detach or attach it correctly. She follows the mouse cursor. one is forced to click a second time on the scene so it works as expected. http://www.babylonjs-playground.com/#1V64LL#0 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 13, 2016 Share Posted March 13, 2016 Fixed Dad72 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 13, 2016 Author Share Posted March 13, 2016 Yes, perfect. EditorControl work now http://www.babylonjs-playground.com/#1UIC0D%230 Thanks DK GameMonetize and Pryme8 2 Quote Link to comment Share on other sites More sharing options...
distraub Posted August 16, 2017 Share Posted August 16, 2017 I seem to have this same issue on the alpha preview builds. But do not experience the issue on 3.0 stable. return t.prototype.attachControl = function(t, i) { var r, n, o, s = this, a = this.camera.getEngine(), l = 0; this._pointerInput = function(a, h) { var c = a.event; if (a.type === e.PointerEventTypes.POINTERMOVE || -1 !== s.buttons.indexOf(c.button)) if (a.type === e.PointerEventTypes.POINTERDOWN) { try { c.srcElement.setPointerCapture(c.pointerId) } catch (e) {} s._isPanClick = c.button === s.camera._panningMouseButton, I am receiving : TypeError: Cannot read property 'getEngine' of null on the this.camera.getEngine() call It is when I detach the camera on pointerDown, then attach it on pointerUp I am sticking with 3.0 stable for now. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 16, 2017 Share Posted August 16, 2017 Can you repro in the PG? Quote Link to comment Share on other sites More sharing options...
distraub Posted August 17, 2017 Share Posted August 17, 2017 I was able to reproduce it in a PG https://www.babylonjs-playground.com/#0D3P8C Here is a version on stable that doesn't have a problem https://www.babylonjs-playground.com/indexstable#8HS4GZ Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 17, 2017 Share Posted August 17, 2017 Fixed Quote Link to comment Share on other sites More sharing options...
distraub Posted August 17, 2017 Share Posted August 17, 2017 Awesome! you rock! 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.