Arrow-Charge shot, Impalement UE4 Blueprints
- Jalaj Shukla
- Jul 6, 2016
- 2 min read
Hello guys, this time I and my colleague were discussing about melee combat and impalement. We thought that shooting an arrow with proper arching motion, range and charge bar would be super slick and fun to make.
We picked our brains and got down to do some digging and researching. We started with a new First person map in Unreal Engine 4 (UE4) with starter content, this was … well, we figured out this issue late but for better understanding purposes and to keep things streamlined I am going to address it before only.
In the ‘FirstPersonCharacter’ blueprint (BP) I noticed that the spawn of the projectile is based off a hard coded gun offset, which leads to issues like when you make the character look up 90 degrees it seems that the bullet is spawning from the character’s head. So in the ‘FPGun_Skeleton’ I moved the muzzle socket a little further away for the gun to get the desired launch of the projectile. Roughly the socket should be this much ahead:
Now that the socket has been moved, I needed an arrow and since I am not good at 3D art I got an arrow mesh from the internet and used that. The arrow shouldn’t have collision and add a small sphere in the Arrow_Fly BP it should look like this:
Now I added a projectile movement component to this arrow and some nodes to adjust the arrow’s rotation on every tick. It should look like this:
After a lot of hits and misses finally made it work and this is how the final charge up bar code looks in the ‘FirstPersonCharacter’ BP

For arrow impalement I made a duplicate of the Arrow_Fly BP and renamed it StaticArrow BP, delete all the script from the static arrow. Now in the Arrow_Fly I wrote this script that basically traces a line and if it’s a hit on a bone will spawn that static arrow and it will attach the same arrow to the AI making it look like impalement and also destroying the Arrow_Fly
Had a fun time making this work and also added a couple of impromptu features(that’s why so many extra connections) like when attacked the AI would become a rag-doll or even partial rag-doll, that was so much fun, made grappling hooks and alternate fire spawning new AI characters, maybe I’ll make another post about them in the future.
Final video showing the things achieved:
Comments