How do I make a ParticleEmmiter Quickly Burst then remove itself from the rootNode?
I don’t know about the burst by heart, but if you check it’s documentation, there might be some “time” constraint.
As for the removable, that depends on your approach, the Pro way would be adding a CustomControl to it. That leads to auto-removal in just the right time. Example:
private float removal_delay = 3000f; // Or set it dynamically using some constructors
public void update(float tpf)
if (removal_delay > 0f)
removal_delay -= tpf;
rootNode.removeChild(this); // Don't know the exact call, might be this.getNode() or something
And you are done with that.
What do you mean with “create Spatials in other classes”?
You can always do:
Spatial s = app.getAssetManager().loadModel("Models/Monkey.j3o");
For that, you need to have the “app” reference, which you should get in each AppStates initializer.
You could use something like the following in your MainApplication but it’s not the proper way to do it and manipulating the nodes (from outside any of those update methods) will lead to a crash.
public MyApplication extends SimpleApplication
public static MyApplication ref;
ref = this;
It is highly discouraged to do so, try to understand jMe’s way of handling things.
Now to your GuiProblem: It seems like you have a 3D-Model? Are you sure that you want that to be part of the gui? (Which is mostly 2D Images). I don’t know if Nifty can handle 3D Models properly but in general it looks like the following problems:
a) You did not apply rotation in blender (CTRL+A when the model is selected). This will recalculate the triangles. If you don’t apply, it’s only blender which rotates and not the whole model.
b) You messed up exporting/importing. Use the “.blend” Model Importer over the OGRE .xml Exporter.
And what do you mean with “billboarded image”? (Sry, I’m not native :P)
In general you could use a flat cube Geometry and assign it a Texture, if you want to have 2D Images in the rootNode.
On the other hand, I’d do that all in Blender as kind of Level Editor