Hello everybody,
I have a little problem with a “blueprint” project. I have to know how many times and what “overlapped” an “actor”. I tried it somehow with “EventActorBeginOverlapp”. But I can not get it that to count the number of “Overlapped actor”.
Thank you in advance
If you mean overlapped in this moment, you can use “GetOverlappingActors”. Use it carefully, cause its expensive.
Use Get Overlapping Actors node, then the array length to find the number of overlapping actors
Thank you for your answers,
but i couldn´t solve the problem right now. Maybe my Question wasn´t specific enough.
I try to spawn an actor, but when the spawned actor collide with another actor more than one time(or two), destroy it!
Please help, because it didn´t work!!!
Thank you in advance
240119-
Just give the actor “health”. On each overlap event take away “x” amount of health, so if you want it to die after 1 overlap take all the health away, if 2 overlaps take 50% of the health each time. After each overlap, check health, if < or = 0 destroy actor. That is the simplest, least expensive way to do it. No need to see how many “actors” are overlapping.
A simpler solution is an int var “TotalOverlaps”. +1 every time it is overlapped. If TotalOverlaps = Overlaps to destroy, destroy the actor.
The reason i think this is simpler is you don’t have to divide health by a certain number, which can sometimes give irrational / too long numbers.
Thank you again, but it didn’t work anyway. Maybe the problem is, that the actor counts the total Overlaps additionally AFTER spawned. But that isn’t what i want: if there is a collision while spawning, do not spawn. E.g. If the Actor spawn in another Actor or in two. So maybe my Approach wasn’t the best. Perhaps we should use “Colliosion Handling Override”. Here some pics of the main Problem:
first Picture(22): ue4 don’t see colliosion, thats probably the reason why nothing works. Which settings do i have to change?
second Picture(23): Overlap Settings of the Actor
I don’t know. pls help!!!
Please explain better what you are trying to achieve. I am not following at all. You spawn an actor then want to know if something overlaps it? You want to spawn an actor but only if it isn’t colliding with another actor? You want to know how many things are currently overlapping one actor? You want to know how many times something overlapped an actor after spawning? Everyone is trying to help you answer one of those questions but no one really seems to know what you want. So help us to help you by having better explanations.
Thank you for your critic. You are abselutly right. While writing on this answerhub i solve some of my Problems, but with these, some other problems were added. So i am very sorry that you missunderstood it. I hope you don’t give up helping although i am not discribe precisly and that you can help me anyway.