hello! I have a issue with my particle system. My particles rotate around an object, and they seem fine, until one particle comes in front of another and blocks the one behind it, it should still be visible because of the transparent. This does not happen all the time, sometimes when 2 particles come one in front of another (from camera view) you can see the further particle (like you should with transparent property set to true). it fixes when I set depthtest to false, but then I don’t get the rotation effect I want. I think its because of the render order. I saw a fix using .sort() and camera.distanceTo, but I dont know how to implement it with three.points. this is my code. and rotateParticle is in the render function. Thanks!
var particleCount = 300
var particles = new THREE.Geometry()
var pMaterial = new THREE.PointsMaterial({
color: 0xffffff,
size: 0.25,
map: textureLoader.load("./textures/particle.png"),
blending: THREE.AdditiveBlending,
transparent: true,
opacity: 0.4,
});
for (var p = 0; p < particleCount; p++) {
var pX = getRndFloat(-15, 15),
pY = getRndFloat(-10, 10),
pZ = getRndFloat(-15, 15),
particle = new THREE.Vector3(pX, pY, pZ);
particles.vertices.push(particle);
}
var particleSystemPoints = new THREE.Points(
particles,
pMaterial
);
scene.add(particleSystemPoints);