MonstrousSoftware / MonstrousSoftware.github.io

Blog about game dev coding
Creative Commons Attribution Share Alike 4.0 International
0 stars 0 forks source link

2023/11/03/Tutorial-3D-step3 #1

Open utterances-bot opened 4 months ago

utterances-bot commented 4 months ago

3D Tutorial - Step 3 - GLTF support | Coding Adventures

by Monstrous Software

https://monstroussoftware.github.io/2023/11/03/Tutorial-3D-step3.html

pindakm commented 4 months ago

Hi, I am newbe in libgdx but after finishing this step 3, I could see only black objects. I tried other tutorial code and I found the problem. Problem is, that is missing sceneManager.update(delta); in render method. After add this line to render method the texturas are ok. So here is my render method which is working: @Override public void render(float delta) { // Draw your screen here. "delta" is the time since last render in seconds. // update camController.update(Gdx.graphics.getDeltaTime());

    if (Gdx.input.isKeyJustPressed(Input.Keys.ESCAPE)) {
        Gdx.app.exit();
    }

    // render
    ScreenUtils.clear(BACKGROUND_COLOUR, true);
    sceneManager.update(delta);
    sceneManager.render();
}

Have a nice day. Michal

MonstrousSoftware commented 4 months ago

You are right. Thank you for spotting this. It has been corrected now. Good luck with the tutorial!