OnParticleCollision unresponsive. Help?

Working on the Argon Assault module, and trying to setup the particle collisions for my ship. I get zero response from shooting my enemy targets. The laser particles are bouncing off of the target, but still registering no collision. Done a fair amount of troubleshooting and I’m now officially at a loss. Could use an assist.

I confirmed the target has a collider, as well as that the script is attached. It is also not set to be a trigger.
Laser prefab is set for world simulation space, collisions are enabled, set for type world, start speed is set to 100, and send collision messages is enabled.
I’ve confirmed the changes to the prefab are populating to the active prefab in the scene.

I have my enemy script setup to send a simple debug message. I get nothing.

Any thoughts? Am I missing something?

Hi BlackGoat,

Welcome to our community! :slight_smile:

Is “Send Collision Message” enabled in the Collision module of the Particle System?

1 Like

Hi Nina.

Thanks for the response. I have confirmed that send collision messages are enabled. Still, no response when the particles are actively bouncing off of the target spheres.

Does the game object with the collider have got a script with an OnParticleCollision method attached? If it does not, no message will get logged into your console. Double check the spelling of the method because C# is case-sensitive.

I had “onParticleCollision”. Super frustrating, hah. Thank you so very much! The Destroy() function didn’t seem to work, but I can look into that now that at least the collisions are registering.

Indeed, super frustrating but be glad that you made that typo. It’s part of your journey as an aspiring game developer to make all those typical mistakes and learn how to fix them. Once you are a bit more experienced, you just quickly check your project for them. It’s often a little detail that’s preventing your project from working as expected. And rest assured that everybody makes those mistakes, even experienced programmers like Rick or Gary. :wink:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms