GUI Blocks Navigation

Recommended Posts

Hello everybody,

I'm trying to add a simple GUI to my project. However, as soon as this line of code is inserted:

let advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");
  1. My navigation system is broken, even though I have a free camera, I can't navigate the scene.
  2. I have following errors in my console:

TypeError: e.isPointerCaptured is not a function[Learn More]

Source map error: request failed with status 404
Resource URL: http://localhost:63342/filezillaproject/src/js/babylon.gui.min.js
Source Map URL:[Learn More]

I've tried:

  1. Running on Firefox and Chrome,
  2. Local server and Web server.

Full source of my application:

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <title>Scene Design</title>

        html, body {
            overflow: hidden;
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;

        #renderCanvas {
            width: 100%;
            height: 100%;
            touch-action: none;

    <script src="src/js/babylon.js"></script>
    <script src="src/js/babylon.gui.min.js"></script>
    <script src="src/js/TimelineLite.min.js"></script>
    <script src="src/js/TweenLite.min.js"></script>
    <canvas id="renderCanvas"></canvas>
        let scene, tl, sphere, ground, Plane;

        let slider;

        let createScene = function(){
            let canvas = document.getElementById("renderCanvas");
            let engine = new BABYLON.Engine(canvas,  true);

            let scene = new BABYLON.Scene(engine);

            let camera = new BABYLON.FreeCamera("Camera", new BABYLON.Vector3(2,4,-3), scene);
            camera.attachControl(canvas, true);

            let light1 = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(1,-1,4), scene);
            let light2 = new BABYLON.PointLight("light2", new BABYLON.Vector3(0, 1, 4), scene);

            sphere = new BABYLON.MeshBuilder.CreateSphere("sphere", {diameter: 2}, scene);
            sphere.position.y = 1;

            Plane = new BABYLON.MeshBuilder.CreatePlane("Plane", {width: 6, size: 6}, scene);
            Plane.position.z = 5;

            //BACKGROUND, GROUND
            scene.clearColor = new BABYLON.Color3(0,0.8,0.6);
            ground = BABYLON.Mesh.CreateGround("ground", 200, 200, 1, scene, false);
            let groundMaterial = new BABYLON.StandardMaterial("ground", scene);
            groundMaterial.specularColor = BABYLON.Color3.Black();
            ground.material = groundMaterial;


            window.addEventListener("resize", function(){

            let advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");
            return scene;

        scene = createScene();

        tl = new TimelineLite();
        tl.fromTo(sphere.position, 3, {x: -2}, {x: +2});


Share this post

Link to post
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.