I want to have system of nodes (2d locations). These nodes are connected to neighbor nodes. Particles are spawned in a certain node. After that they are launched towards one of the neighboring nodes. Upon certain radius of destination node, they are given next node to approach. This loop continues until they come to contact with certain exit node and are destroyed.
All the nodes and their relations exist in an VL class I made. I’ve done some experimentations with DX11.particles particlesystem and I would like to use it for it’s performance.
How can I loop through the particles and for those that collide with any of the nodes, give a new heading? Selection nodes seem awful when there could be 50+ nodes.
Is a bit hard to tell how you’re doing at this stage without an example or knowing the internal logic of your patch, but it sounds pretty cool.
I don’t know how many particles you intend to render in total, but your particles could keep a little spread of intergers which is added to with the corresponding index number of each node they’ve past through. When the particle is at a certain distance from a node it could check if that node has been passed through before
if (particle.passedNodes.Contains(NearestNode))
{
IgnoreNode();
}
So you would need to add a index number to the Node object and a passedNode List to the particle property.