I have collision working just how I want it with my particles (projectile-style particles). I’m not having problems with the actual collision aspect. I’m just wondering if it’s possible to know which actor the particle collided with in Blueprints? I have location, normal, etc. from the onParticleCollide event, but no information on which actor was actually hit. Is this possible, or will I need to use a different type of effect for this?
I have the same problem, did you end up resolving this? The only thing I can think of is to use the location and cycle through the actors to find the closest one. But that seems like a hack.
Thanks!
It’s been so long I don’t remember, but off the top of my head I can think of 2 solutions: linear check for collision, starting from the effect source and pointing to the hit location, or doing a trace by sphere or similar trace at the location of the collision and finding the nearest actor.
That said, I’m not sure what your effect is or what you need this for but it’s generally a good idea to avoid mixing things like this together. You should strive to keep your gameplay and effect logic separate. For example, my effect was a laser beam kind of thing; I wanted to know the hit actor to apply damage. If I remember right, my solution was simply making the hit tracking code entirely separate, using line trace by channel or something like that, and the effect being self contained and separate from the firing logic.
A linear trace sounds like a good option. And yeah, it makes more and more sense to decouple the effect logic from the event. Thanks for coming back to this!
1、Use particle‘s OnParticleCollide Event, and create a new actor, static meshe or other thing can collision, maybe you need use particle’s size and location.
2、use the new actor’s OnComponentHit Event, now you can get the hit actor.
sorry for my English…
1、Use particle‘s OnParticleCollide Event, and create a new actor, static meshe or other thing can collision, maybe you need use particle’s size and location.
2、use the new actor’s OnComponentHit Event, now you can get the hit actor.
sorry for my English…
hi Ckcfcc
I’ve been trying, but with no success, for several days… if you have time, would you please take a screenshot of such a blueprint and post it.
Here’s the thread I posted yesterday, with screenshots of my efforts…
Thanks! David
Thanks for ckcfcc.I find a way to do this and I think it is more easy to do and it will not cast some strange error.
I use “Line Trace By Chinnel” node to do this. It start by “Location” and end by “Location” add “Direction”. Then you can get a Hit Result. So you can get hited actor and any thing you want.