How do I return Collision target from the particle trigger module?

96 Views Asked by At

I'm a new in Unity.

I wanted to make a game has some features in the particle system interact with the game environment. So I was using a Collision module or trigger module to the particles directly affect the game environment.

I was going to verify it first to using collision Mudule. bcuz it takes a long time to make the particle's function into a bullet system from the start.

enter image description here

The first problem is that every time I use CollisionModule, the Particle Collide and flies away without RigidBody.

enter image description here

The second problem was the trigger module does not return the collision target.

If I simply tried to make the projectile disappear after an attack, I could use the collision module, but I wish my projectile could penetrate the enemy.

enter image description here

This is the result I made with only trigger modules and sub-emmiters, and it's what I wanted look like.

I hope monster get actual damage to the bullet collided and get information about the victim from a script from the particle or attacker or victim, but I can't find a way.

enter image description here

I hope the script can detect the Collision event with the collider or victim gameObject

In the past, posted on StackOverflow and Unityy manuals have only been said to have no relevant information or functionality yet.

I don't want to use raycast because it can't sync with the speed of the particle,

A bullet system that creates moving independent objects and summons moving particles as children is still not fit for purpose.

What I do now is spawn a boxCollider with the "isTrigger" check on the victin's position for 0.1 seconds to identify the hit, but I'm not sure if it will work.

I hope it can solved. Thank you!!!

0

There are 0 best solutions below