Hi guys during this day i’m trying to create a twin stick shoter with bow and arrow… but i have a big problem… I don’t know how to make bow and arow work together. I want the arrow (projectile) spawn at a particular moment of the animation…
I tried with anim notify but i’m new with unreal and I dont know how to do.
I followed the Unreal Tutorial Playlist on youtube (twinStick playlist) and i have all the same blueprint.
If you should post an image I think I’ll understand.
To do something like my video I have a character a bow and an arrow as separate actors. The Bow has a function to spawn and fire arrows. The character has a function to call the bows spawn and fire. The Animation BP has AnimNotifys and a StateMachine that checks that its ok to fire which calls the characters function that then calls the bows function that spawns and shoots the arrows. Depending on what your trying to do you should be able to just get away with a character and an arrow if you don’t want to reuse the bow across multiple characters. [video]W.I.P. #1 - YouTube
Hi! Thank you! Yes I want the same thing!
I have Character bow and arrow as separate meshes.
Please Should you share with me your settings as Blueprints and animBp and anim Montage ? It’s for a univeristy project and i need to finish it quikly.
I won’t share specific details but hopefully enough for you to figure it out in your case.
My Archer has a animation sequence that has 4 anim notifies in it.
Spawn Arrow (in the timeline its when he picks up the arrow)
Release Arrow (in the timeline this is when the shoot is fired)
Prepare (used for resetting the bow’s fire mechanic before the animation is done playing)
Done (used to say the animation is done, don’t think its technically needed but i like having things be consistent)
My Archer’s blueprint class has an Enum which is used for state changing in the Animation BP and also some other variables for checking conditions. Also it has functions that just update the variables (Needed for networked games).
My Archers Animation bp (event graph) has events for entering and leaving states + the anim notify events
AnimNotify_SpawnArrow gets a reference of my bow then calls the function which spawns the arrow
AnimNotify_ReleaseArrow gets a reference of my bow then calls the function which releases the arrows
AnimNotify_Prepare sets all the variables back to being ready to fire again other than the one which changes states.
AnimNotify_Done sets the variable which enables changing states.
My Archers Animation bp (anim graph)
Uses a StateMachine
inside the state machine I have Spawn, Alive, Attacking, and Dead with variables created inside the Animation BP controlling them (every update animation they are being refreshed with the Archer’s Blueprint variables).
Well set an anim notify when the animation is at the right time, then on your animation blueprint > Event graph, right click, search for your anim notify, cast to your controller, send a custom event that spawn your projectile, i suggest you to spawn the projectile on a Vector field set in front of your bow, well i can show you later how i did on y project (it’s a bit messy but, well it works)
Thank you very much king scott, today i’ll try
Crysux i wanna make the same thing you explained. Should you take a screenshot of the blueprint so i can understand better?
Thank you guys!
Hi crysux, I’m working with Fede23 at the top down shooter… so could you please show us the animation blueprint? How can we add the vector field? Is it a component that we’ve to add in the bow blueprint?