Delay between onPointerDown and onPointerUp

Actually I am experiencing an interessting behavior :slight_smile: I set up a multiuser Experiment, using noserver and babylon.js - so far everything worked pretty well and i connected my scene successfully with client and server. Everything works fine UNLESS a specific image is clicked :smiley:

This is my snipplet of code to handle the onPointerDown and onPointerUp event:

                   if(World.FirstButton){
                       World.FirstButton.onPointerDownObservable.add(function() {
                             console.log("FirstButton was clicked!");   
                                    });
                                  }

                     if(World.FirstButton){
                      World.FirstButton.onPointerUpObservable.add(function() {
                    console.log("FirstButton was released!");   
                });
           }

Between onPointerDown (that is triggered correctly) and onPointerUp there is a Delay for minutes. I don’t know why and there is no error output on console. What is on console is a violation of rendering time, that appears sometimes and I think the problem might be caused by this.

has anyone experiences or any kind of solution for? :slight_smile:

Edit: Please don’t get confused because I named it “FirstButton” - nervetheless it’s an image, I want to use as a button :smiley:

 World.FirstButton = new BABYLON.GUI.Image("firstButton", "http://[myTestServer]/dev/images/myImageSource.png");
                        World.FirstButton.width = "55px";
                        World.FirstButton.height = "80px";
                        World.FirstButton.top = 260;
                       World.FirstButton.left = -320;
                      
           
                      //console.log(World.advancedTexture);
                      //console.log(World.image);
          
                      World.advancedTexture.addControl(World.image);
                      World.advancedTexture.addControl(World.FirstButton);

Hello,

This sounds weird there is some delays between those :frowning: Could you create a quick repro in the playground ?

I’ll try my best - I am still a newbie though :smiley: Actually I tried to replace my Image with a real ImageButton, that works fine with onPointerClick();

1 Like