Using scene in game

Hello

I created textured terrain and skybox in Terrain Editor. Saved it and now have it in file Scene1.j3o.

How use that in game? I tried code: [java] rootNode.attachChild(assetManager.loadModel(“Scenes/Scene.j3o”));[/java] but it dont work

EDIT:
[java]rootNode.attachChild(assetManager.loadModel(“Scenes/Scene1.j3o”));[/java]

Maybe you have no lights in your scene? Attach a DirectionalLight to the rootNode or place some in your scene (note they will only light stuff thats part of the same node).

Ok it work but there are no textures. Also my terrain collision code from tutorial dont work with .j3o. How can i covert j3o to heightmap and all other graphic files to load it same as map from tutorial?

not sure which tutorial youre specifically talking about, but a heightmap is something you’d provide, and it’s not used for collision detection, its used for generating terrains.

If you want your scene to be a collidable object in BulletAppState look at the hello physics tutorial which shows you how to add rigid body controls to any spatial.

Thank you man :slight_smile: