Actually I am experiencing an interessting behavior 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
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?
Edit: Please don’t get confused because I named it “FirstButton” - nervetheless it’s an image, I want to use as a button
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);