Me and my comrades are making a game in Unreal Engine atm and we need to figure out how the character can move around in the scene "any direction" and still be able to shoot forward, like second son:
https://www.youtube.com/watch?v=MnGpfRBZWAcExample:
Character face forward and shoots target, neutral shoot animation.
Character face towards camera and shoots target, upper body rotates and he aims forwards.
How can I achive this?
/cheers
Replies
Least, that's one way. there's probably others.
Seems a bit complicated but I think I understand the concept. Simply create an aiming pose on the upper body for every possible direction the character can run that aims in the direction to fire of the shot? Then I somehow need to create a blendspace in Unreal that check my characters direction and blends correct pose when shooting.
As of now, player can move around in our level and shoot. Projectile moves towards the aim and we wish to blend animations so that the arm shoots in the correct direction even if the players direction does not match.
https://youtu.be/yWmunECZ1zo
We currently have some test animations where the arm shoots forward,left,right and backwards.
Now we need to figure out how to apply the correct animation from the montage depending on the relation between camera and player rotation.
Any Ideas?
I also figured out how to be able to call specifik animations from a montage and will post the process in this thread tomorrow.
As of now, I have taken the camera and character rotations and made up 4 camera states with ranges over a 360 area and im going to do the same with player rotation so I can compare states and apply the correct upperbody animation
Not de best way to do it maybe but code aint my strongest game.
So, Now we have our character playing the correct animation depending on character rotation and camera rotation. Ended up reading cam-rotation ranges and storing them in int variables, same for the character. Then I just played my anim montage and depending on the relations between cam-rotation state and player rotation state we used jump to secuence and played the animation needed.
Next step is to get a working blendspace for dashing!
We just started sculpting our hero character that will replace the ue one.
Here is an update of now.
We have currently added a dash that we hope to create a blendspace for so that the character leans left and right when turning.