Arrows shot at wall with collision box on their tip do not attach at the tip all the time?

Hi there, new to unreal 5 and blueprints. Ive working on an archer who shoot arrows, and i want the arrows to stick to their targets. Im currently just shooting them at a simple wall with collision. All the arrows shoot, and stop, and attach to the wall, but they attach at VARIOUS depths. My collision cube is tiny and at the very point of the arrow, they should all stick to the wall from the very point. But, some stick at the point, some 1/4 in, some 1/2 in, and some all the way to the fletching. Is this an order of operation issue? I stop velocity and gravity before attaching actors. Or is the arrow going too fast do i need to send updates more often? Or do i need to manuall tell it EXACTLY where to attach (which i though the attach actor to actor was doing). Thanks in advance.

I stop velocity and gravity before attaching actors.

  • how do you detect the collision - BeginOverlap?
  • are you using the Projectile Movement Component - probably not since you’re mentioning velocity, gravity (which also suggests you’re simulating physics) Could you confirm?
  • what kind of velocities are we dealing with here?
  • how thick is the wall?

The PMC does its own simulation, gravity, sweeping collision and sub-stepping and produces this somewhat consistent result at default settings with velocity around 3000:

These are projectiles hitting one another. I am not even using attachment here; you’d need attachment if the target was moving.

I use On Component Begin Overlap (Box). My box is tiny and at the front of the arrow. Initial and Max speed of the arrow actor are set to 5000. The wall is scaled to just 1, HOWEVER, i tried making its thickness .1 and now SOME of the arrows pass through it all together and SOME stick. I dont think im using PMC, just normal velocity and gravity inputs (new not sure).

You are:

image

  • can we see the hierarchy of the actor?
  • are you simulating physics (on the box collision which I assume sits at the root of the actor?)
  • how are the projectiles launched?

And the thickness of the wall may matter at high velocities. The thinner the wall, the more tricky things get.

I had simulating physics off, when i tick it on for the box ALL the arrows go through thin and thick walls.

hierarchy

The hierarchy could be an issue. Re-jiggle it so it looks like so:

image

Neither box or the static mesh should be simulating physics. The static mesh should have collision disabled.

I changed the hierarchy but same result. simulate physics is off for both, collision is diabled on arrow mesh.

Top arrow in screen shot accurately shows where box collision is at.

I tried turnin on Constant Collision Detection on the wall i was hitting but basically the same result, maybe a few less deep in.

Tried ccd only box collider on the arrow, as well as on box collider and wall together, same result.

Tried enabling physics sub-stepping. Same result.

I misundertood, trying to setup hierarchy like you showed, removed root scene, arrow flying out in z axis though, trying to fix and test

For the PMC, right? Because the collision and mesh are not simulating.


Not sure if needed, but for the sake of clarification at 10k velocity and no substepping:

And this should be OK to attach it to other physics simulating entities:

I would be wary of attaching and stopping the PMC (in this order), not sure how that would mesh with welding physics. May or may not work.


The above is based on the UE5 fpp template but there’s little else I’d do differently. UE4 templates had some odd choices here and there :man_shrugging: Perhaps redo the projectile if you’re getting inconsistent results. I’ve seen so many engine quirks over the years that I generally trust no one.

One thing this is missing is accounting for player velocity; currently, if you run faster than the arrow and fire it, you’d shoot yourself in the back. Classic Bugs Bunny style. May be irrelevant here, ofc.

1 Like

So I tried it using an ON HIT event rather than ON OVERLAP and that resolved both the thin wall issue and the arrow depth issue. In addition it gives me a bunch of hit location data i will use for other things.

1 Like

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