I’m new to VFX graph generally, and I’m trying to kill a strip when it’s “head” particle dies.
atm the particle lingers after the main particle is killed.
I’m new to VFX graph generally, and I’m trying to kill a strip when it’s “head” particle dies.
atm the particle lingers after the main particle is killed.
I guess that you’re talking about a classical scenario of Spawning a trail/strip thanks to GPU Events?
If so, this will depends on how your head is dying.
If the cause is natural death:
= Age >= Lifetime ? 0 : 1;
then you’re in luck.
For this, you can inherit the Lifetime and Age of your Head particles.
If you create a new VFX you can take a look at the Head and Trail template that is set up this way.

Now, if the cause of
isn’t natural, some workaround would be needed as if I’m correct, no relation is kept between the Child and their parent when using GPU Events.
Now, They’re multiple ways of spawning Trail/strip (While still having a head) that don’t require GPU Events. This might be a side track, but if you’re interested, I would suggest that you take a look at the VFX Learning Sample as it contains some examples on how to spawn Strips with or without GPU-events.
yeah it’s the second case, in short I want the strips to be killed on collison but they seem to just stop instead.
The only decent solution so far is a short lifetime so it’s not too noticeable.
So if they are not dying due to their lifetime, you need to use work around.
A solution that can work is to use a buffer or a texture to store the Alive state of the Parent/Head Particles. This can be read by the children to synchronize their death.
In this small package, I’m joining two solutions that do just that. One solution is using a Graphic Buffer, while the other is using a Texture.
VFXG_BuffersBind_HeadInfos.unitypackage (1013.2 KB)
Note: This package has been made with Unity 6.1 Alpha that might not be already available. The ability to use RWTexture2D in HLSL directly in VFXGraph just landed. This package also contains a solution relying on Graphic buffer that could be achieved with older Unity 6 version.
Both solution relies on the same idea and steps:
Graphic Buffer:
Create and Bind Buffer:

using System;
using System.Runtime.InteropServices;
using UnityEngine;
using UnityEngine.VFX;
//Allow to execute in Editor
[ExecuteInEditMode]
public class BindBuffers : MonoBehaviour
{
// The VFX with the exposed Graphic Buffer.
[SerializeField] private VisualEffect vfx;
// The Size of the Buffer.
[SerializeField] private int m_BufferCount = 64;
private GraphicsBuffer m_Buffer;
private void OnEnable()
{
// Create a new Structured Graphic Buffer of type uint and use our count.
m_Buffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, GraphicsBuffer.UsageFlags.None, m_BufferCount, Marshal.SizeOf(typeof(uint)));
// Set the VFX Graphic Buffer property with our previously created Buffer.
vfx.SetGraphicsBuffer("HeadBuffer",m_Buffer);
}
// release the Buffer.
private void OnDisable()
{
m_Buffer.Release();
}
}
Parent System Setup Initialize:
uint headIndex = attributes.particleId % BufferCount;
void WriteHeadBufferIndex(inout VFXAttributes attributes, in RWStructuredBuffer<uint> myBuffer, in uint HeadIndex, in uint data)
{
myBuffer[HeadIndex] = data;
}
Parent System Setup Update:
Set up your Collision Block and Trigger Events
Upon Collision, Write 1 at the corresponding Buffer Index:
Delete you Parent Particle:
Child System Setup Initialize:
Child System Setup Update:
//notice That while it's the same buffer the usage is different has we only want to read from it.
// Having different Buffer usage is possible if made in different compute shader.
void ReadAndKill(inout VFXAttributes attributes, in StructuredBuffer<uint> myBuffer, in uint HeadIndex)
{
if( myBuffer[HeadIndex] == 1)
{
attributes.alive = 0;
}
}
We’re checking the buffer at the inherited Parent Index. If the value is 1, this mean that the parent is Dead and we can kill everyone.
This can work for child strip system but also with regular child’s particles.


I hope this will be helpful. ![]()
NICE!
Out of curiosity, is there a way to make the particles like “run into” the surface it collides with?
Like it seems strips are a series of particles, couldn’t they individually die on contact rather than all at once?
As if they collapse into the surface.
Do you mean that you want the child particles to be attracted by the Collision surface or the Collision Hit of their respective parents? If, so instead of an uint buffer, you could use a float3 to store the Collision Position of the parent.
Now, Particles can die individually on Collision, it’s just a matter of adding a collision block and setting the Collision response to “Kill”. But what you’re asking contradicts your initial question ![]()
But I might misunderstand what you’re looking to achieve.
I’ve just took the previous example, got rid of the “Read Parent HLSL” part, added some gravity and the same Collision shape as the parent. The behavior is set to “Kill” instead of “Collision”.

Oooo fascinating, I’ll work on this soon!