Hello Everyone,
I consider myself a newbie (only started around Nov 2023) and loving UE5 so far !
I came across a situation using an animation montage and could use some advice.
Here is the scenario.
Game Type: Third Person Action/RPG
I created a montage using an animation in which the character walks forward while dual wielding guns firing in multiple directions. The animations Root Motion is ticked as I do not want the user to be able to click any inputs while the animation fires off.
The animation is triggered by pressing a number key (lets say key #4). From the point the key is pressed, the player character than goes into its animation without any issues visually.
Here are my 2 issues:
-
Once the animation fires off, if there are any obstructions directly in front of the animation, the player character will simply walk right through it therefore, no collision is being detected and it will not stop/bump into the object in front of the player character.
-
As I mentioned, part of this animation is firing 2 guns in multiple directions. So what I need to do is spawn a projectile from within the animation in the appropriate directions the guns are facing at the appropriate time the projectile should be spawned from the nozzle of the gun. Another fact to mention is that the 2 guns are separate from the player character skeletal mesh so each gun has its own skeletal mesh along with appropriate sockets set to the barrel of the gun.
There you have it. How would you approach both issues ? For the first, I was thinking some sort of Pathfinding is needed so that the player character would detect a collision and try to walk around it. For the second, I was thinking of handling this with notifies placed at the point of each “gun fired” where I spawn the projectile based on the location and direction of the gun socket.