How to Instantiate the hit explosion at the impact point?

Thank you. The code was helpful. :slight_smile:

Assuming you copied and pasted ParticleCollisionEvent.intersection from the API, let me explain how to interpret the information there. This is the relevant part:

image

public Vector3 intersection; means that this variable/property is part of an object. I can see that because there is no static keyword. With the static keyword, it would be part of the class.

If something is part of a class, we can access it directly via the classname, for example, Mathf.Infinity. Look it up in the API.

In other games, why did you create a variable of type ParticleSystem instead of simply executing ParticleSystem.GetCollisionEvents?

If you know the answer, you know how to apply ParticleCollisionEvent.intersection correctly. It works the same way as Rigidbody.velocity and GameObject.transform.


To which line does the ArgumentNullException refer? And to which particle system does part refer? Whose collision events do you want to check?