Load level, access scene object and mesh collider

Hi, I have a couple beginner’s questions (I am a new user of JME, please have mercy and understanding). Before JME I used Unity.

  1. whether is there some example how can I load levels, for example I have game which has a splash screen (level) with menus when I press cmd button “Play Game” I want to open a second level, when I complete (for example) level 1 of the game I wish to game load next level etc. How can I achieve this?

  2. I create scene in Blender, import them to JME, then I wish add some dynamics to my objects in the scene, for example I wish to spin or move objects in the scene through my code. How can I access to that game object?

  3. I have character in the scene and I wish to attach to character a particle emitter (or something else) how can I achieve this?

  4. Is there a Mesh Collider in JME, something like Unity mesh collider, or can I create simple collider sets for particular objects in scene.
    For example I have “complex” mesh and I wish to create colliders around that object.

Hi,

Disclaimer : Severals solutions exist for your questions, I’m not a jme expert, I share how I can do what you try

@indev_app said: 1. whether is there some example how can I load levels, for example I have game which has a splash screen (level) with menus when I press cmd button "Play Game" I want to open a second level, when I complete (for example) level 1 of the game I wish to game load next level etc. How can I achieve this?

You can use AppState as Unity’Scene to initialize and to cleanUp your rootnode, … (cleanup is not done automatically, it’s your responsablility). AppState is not Scene, you stack theme, enable/disable,… In my app I use the term “Page” for ~ Unity’s Scene and create a PageManager to take care of having only one Page at time.

@indev_app said: 2. I create scene in Blender, import them to JME, then I wish add some dynamics to my objects in the scene, for example I wish to spin or move objects in the scene through my code. How can I access to that game object?
via the api : Node.getChildren, or visitor via the SDK : you open the scene, you can explore the scene, add node, control (see tutorial)
@indev_app said: 3. I have character in the scene and I wish to attach to character a particle emitter (or something else) how can I achieve this?
via api : https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:particle_emitters via the SDK : scene explore + right click
@indev_app said: 4. Is there a Mesh Collider in JME, something like Unity mesh collider, or can I create simple collider sets for particular objects in scene. For example I have "complex" mesh and I wish to create colliders around that object.

yes, see https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:collision_and_intersection

General advice :

  1. read tuto, use the search inputbox (wiki, forum)
  2. May be you could be interested by Zay-ES (entity system), as you come from Unity, else use jme’s Controls like you use Unity’s Components

Good Luck, hope thos info help you

EDIT: fix display

1 Like

Its best to do the “hello” tutorials (docs link in the menu) once to get a basic grasp on how things work in jME. Then read the “best practices” doc for general “how to put my code in classes” etc. questions. Then you should be able to pose more specific questions because as said theres multiple ways to do things.

1 Like
@david.bernard.31 said:

Thanks :wink:

@normen said: Its best to do the "hello" tutorials (docs link in the menu) once to get a basic grasp on how things work in jME. Then read the "best practices" doc for general "how to put my code in classes" etc. questions. Then you should be able to pose more specific questions because as said theres multiple ways to do things.

Thanks :wink: