I’m trying to create a projectile where the player (on the left) shoots a box and kills the enemy on the right. What I get is some sort of weird delay where the box travels through the enemy, waits a couple of seconds and then destroys it.
I’ve included screenshots where I debug and have a break point where box overlap is true. If I click the step button, it will destroy the enemy and then itself. Box1 in the event graph is the projectile mesh that’s in the screenshot.
The event is triggered on the left by a tick event and then goes on to the right for the transform (box moves to the right). If I have the projectile speed too high, it will crash into the static world and be destroyed, not registering any overlap event at all. Any ideas on what I’m doing wrong?
You should not be testing overlaps per tick, because ticks are not continous
and at high enough speeds there will not be a tick-overlap at point of impact.
You are using discrete collision checks
you need a continous collision check
so you need to do a volume trace, which can be done using a box shape, or more efficiently, a sphere trace.
Look up traces while in the BP editor and you will find many options!
I also have additional tracedata nodes to simplify this process for you
many pictures at the link below that show different trace setups.
Trace is what you are looking for
Oh I think I got it. I tested sphere trace before but I had the same thing plugged into start and end (because I expected it to just be a single sphere if you used it like that). Adding a Movespeed * deltatime to the end position seems to do the trick.
It still boggles my mind why the actor overlap works so well with WorldStatic though, I can’t make a wall thin enough that I’m able to shoot through it, even at 1/64th of the enemy size.
If anyone comes across this thread while looking for answers, I will include an image of what seems to be working.