Particle orientation


i'm new to jme, so first of all i want to thank everyone involved in this project. It's awsome what you've accomplished so far.

I'm currently playing around with a small space scene where you can control a ship. To get that feeling of motion I created a ParticleMesh that emits lines. That works great, the only problem is the orientation of the lines. I tried to change that by setting the ParticleOrientation but I don't really get how that's supposed to work since this is only a float value. If this is a radian what's used as the rotation axis?. I also tried changing the emission direction but that also didn't work (doesn't have any effect, maybe because of camera facing?).

The particles are moving correctly on the z axis but the lines are aligned with the y axis.

The code is a slightly modified version of one of the particle tests:

                AlphaState as1 = display.getRenderer().createAlphaState();

      pMesh = ParticleFactory.buildLineParticles("particles", 200);
      pMesh.setEmissionDirection(new Vector3f(0, 0, -1));

      pMesh.setStartColor(new ColorRGBA(1, 1, 1, 0));
      pMesh.setEndColor(new ColorRGBA(1, 1, 1, 1));
      pMesh.setMaximumAngle(360f * FastMath.DEG_TO_RAD);

      Ring emitter = new Ring(new Vector3f(0,0,0), new Vector3f(0,1,0), 8, 10);
      ZBufferState zstate = display.getRenderer().createZBufferState();
      pMesh.setModelBound(new BoundingSphere());


      pMesh.setLocalTranslation(new Vector3f(0, 0, 150));

Any help would be greatly appreciated

well…i figured it out with the RenParticleEditor. I'm setting the line width much higher than the the length, so it looked wrong even when it was not. to align the line orientation with the particle movement is a simple matter of setting setVelocityAligned(true).

If your camera used for particle system, you can't feel its direction was changed. Even if changing emission direction!

Give me some more information about what you want to implement. Thanks!