hello @zarch,
using ParticleController i try to orient particles with an influencer like the regular particle system allows to orient particles
i try to have sparks that need to be alligned toward the velocity vector ( toward the center of geometry)
but i cant make it work
rotation and rotationVelocity have no apparent effect
[java]
@Override
public void influenceParticleCreation(ParticleController ctrl, int index, ParticleData data) {
data.velocity.multLocal(0);
data.velocity.addLocal(data.position.mult(startSpeed));
data.rotationalVelocity.addLocal(0.1f,0.1f,0.1f);
//data.rotation.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);
}
@Override
public void influenceParticle(ParticleController ctrl, int index, ParticleData data, float tpf) {
// data.velocity.normalizeLocal().multLocal(FastMath.interpolateLinear(data.lifeProgress, startSpeed, endSpeed));
data.velocity.multLocal(0);
data.velocity.addLocal(data.position.mult(startSpeed));
data.rotationalVelocity.addLocal(0.1f,0.1f,0.1f);
//data.rotation.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);
}
[/java]
also the fact that velocity is a final variable makes it hard to assign a new value ( only my opinion )
can you help me out ?
thx