Hello! Would anyone be nice enough to guide me on how to pull this off? Which nodes would I need within my Character Blueprint and how would I organize them? https://www.mariowiki.com/Side_Somersault
Been working on my own Third Person Mario character BP: https://youtu.be/5jwjE0SmoUA It’s not in the video, but I recently managed to pull off a smooth wall-slide, wall-jump, and push animation when the character is colliding with a solid block.
This is one of the last ingredients that I need to smoothen things out, but I can’t figure it out for the life of me and there are no tutorials out there!
Hi Meng, replying to your thread as well. If you can’t find any about the somersault specifically, maybe try looking up Unreal Engine tutorials for 180 turns during sprinting or something like that, I remember seeing quite a few. But here’s my reply from the other thread you posted on:
DISCLAIMER: MAY NOT WORK AT ALL FOR CONTROLLER.
Here’s one way you might do it, but might require some tweaking on to make it feel right, or maybe it’s not really a good way at all. I would maybe look for tutorials about doing 180 turns while sprinting to see how people go about coding that logic and maybe it would be better but this is a quick take on it.
Basically, we want to store the previous input value and the current value and take their dot product to determine if the player has done a “flick” where they were moving one direction but suddenly changed direction. The closer to -1 the dot product is, the more exactly opposite the flick was. For WASD this will probably always be exactly -1, for controllers you might have to do some testing, this may not even work at all or maybe you might need to normalize the vectors before taking the dot product, not sure honestly.
The < value is the threshold/leniency of the flicking action to trigger the somersault and the delay is how long the player has to do a somersault once they do the flick. Using a retriggerable delay so the delay starts over if the player does another flick, otherwise the delay on a previous flick could unprime our somersault on a more recent flick.
Hey Ultradbm! Sorry for the late replay! Good news, I got something working, thanks to you. It’s a bit buggy, I added a slide animation in between the somersault ready state, unfortunately I’ve yet to find ways to make it so that it can only be activated once. I don’t show it here, but it is a little buggy. I’ll keep working at it until I get something decent.
Tomorrow I’ll be uploading a part 2 to my character showcase with the new mechanics I implemented and will be crediting you for the help.
Hey Meng, glad to see you were able to figure something out. Feel free to share more details about the issues if you cant figure it out or open a new question and put the link here. I saw the part 2, looks good! and thanks for the shoutout!