i have the following shockwave:
[java]
private Material mat;
public ShockwaveParticleEffect(String name, AssetManager assetManager){
super(name, ParticleMesh.Type.Triangle, 1);
mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
mat.setTexture("Texture", assetManager.loadTexture("Particles/shockwave.png"));
load();
}
private void load(){
this.setMaterial(mat);
this.setFaceNormal(Vector3f.UNIT_Y);
this.setStartColor(ColorRGBA.Red);
this.setEndColor(ColorRGBA.Blue);
this.setStartSize(0f);
this.setEndSize(7f);
this.setInitialVelocity(new Vector3f(0, 1, 0));
this.setVelocityVariation(0f);
this.setParticlesPerSec(1);
this.setGravity(0);
this.setLowLife(2f);
this.setHighLife(2f);
this.setImagesX(1);
this.setImagesY(1);
}
[/java]
and no matter what axis i select the shockwave is inivisble from the other side, i.e. if i attach it to a fence on Z faceNormal and i go behind i cant see the shockwave, but i can see it on the otherside,
is this intentional ?
seems making another shockwave in the negative of the axis is a workaround,
for a Y axis:
[java]
if(negative){
this.setFaceNormal(new Vector3f(0, -1, 0));
}else{
this.setFaceNormal(new Vector3f(0, 1, 0));
}[/java]
should i delete this thread ?
Try material.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off) on the shockwave