HI All,

I am new JMonkey and Game Programming in general. I have a problem that I wish to show the smoky trace of a projectile (bullet or cannon ball). How can I do that? I have so far managed to animate the projectile. I only need to trace the path of the Projectile.

I appreciate any help.


Farrukh Masud

Thanks a lot for the post.

I have gone through the thread and its seems that author of that Code (DarkProphet) had scraped the design, saying that it was not good enough.

Any other suggestions.


Farrukh Masud

I was hoping maybe you'd take the redesign upon yourself  :smiley:

I wish I was that good. But for now I wish if someone else would help me find the solution. :wink:

What about using a particle system with your projectile as particle source location?

Me and darkfrog tried that Irrisor, preloading a number of, and recycling, particle meshes and then creating them when none are free.

I'll let darkfrog tell you how horrible it was, we scrapped the idea completely. But damn did it look good.  :wink:

Sounds like you weren't doing it right :wink:

I had absolutely no doubt we weren

Have a look into the advanced vehicle stuff in jME Physics 2 - it uses a particle system to do the exhaust fumes.

Yes but thats one or two particle systems. We were creating news ones at the click of a button.

Would be enough for FarrukhMasud, at least.

And: I already created particle systems for new objects on "button click" - if you warm them up only a little (not like in the tests like 50 seconds) it's not a performance hit.

Our problem Irrisor, is that we'll never know how many particle systems we

I do not suggest to preload anything (and have not done that myself)

HI Irrisor,

I will sound stupid and naive, but I have downloaded the JME-Physics Beta 2 and apparently it is throwing following Exception

java.lang.UnsatisfiedLinkError: org.odejava.ode.OdeJNI.get_PARENTSPACEID_ZERO()J

Please advise what should I do



I'd probably do something like cap it at some max (25 maybe?) and drop the effects off of less noticeable bullets (ones further away, etc.) as needed

Here is what we were doing which caused noticable jerks, please point out anything odd.

import com.jme.bounding.BoundingSphere;
import com.jme.image.Texture;
import com.jme.math.FastMath;
import com.jme.math.Vector3f;
import com.jme.renderer.ColorRGBA;
import com.jme.scene.Controller;
import com.jme.scene.Node;
import com.jme.scene.state.AlphaState;
import com.jme.scene.state.TextureState;
import com.jme.scene.state.ZBufferState;
import com.jme.system.DisplaySystem;
import com.jme.util.TextureManager;
import com.jmex.effects.particles.ParticleControllerListener;
import com.jmex.effects.particles.ParticleFactory;
import com.jmex.effects.particles.ParticleGeometry;
import com.jmex.effects.particles.ParticleMesh;
import com.jmex.pool.ObjectGenerator;
import com.jmex.pool.ObjectPool;

public class TestLaser1 implements ParticleControllerListener {
   private static final long serialVersionUID = 1L;
   private static long UNIQUE = 0;
   private static ObjectPool<TestLaser1> pool;
   private long id;
   private ParticleMesh particleMesh;
    * Class constructor.
   public TestLaser1() {
      id = UNIQUE++;
      AlphaState as = DisplaySystem.getDisplaySystem().getRenderer().createAlphaState();

The reason I used 300 particles was to reduce the gap between particles as they were spawned.

The particle mesh was attached to a sphere which moved constantly at approximately 300.0f units in any one direction. With a low number of particles there was a considerable distance between spawned particles. I tried to control the rate at which particles were released but failed miserably - its probably really easy too. ://

Have not read through this thoroughly, but did you really need 300 particles per tracer?  That seems to be the biggest thing I see done wrong with particles is using way more than needed.

adamgp said:

Here is what we were doing which caused noticable jerks, please point out anything odd.


No need to warm up one minute!!! This costs lot's of cpu cycles.