I want to have a ball appear around my player when they input the jump button like shown here Sonic Lost World jump sound effect - YouTube
Hey there @Unleashed! Welcome to the community! Thereâs a ton of ways to go about this! It gets to be specific to how youâd want the implementation to work. Since you are all about the sonic motif, Iâll tailor my answer to work somewhat like that. First youâre going to need to determine if you want this to be entirely programatic or if youâd like to use animation states. I highly recommend learning animation states first and foremost as it ties directly into gameplay for many games. Take a bit of a read through of the documentation (or the video tutorial if you prefer)
Basically youâre going to want to tie this into your animation states since youâll be animating your not-sonic to roll into a ball (presumably). Youâd handle animations to change the visibility of the ball and the player via animation states.
The simplest but least extendable method would be to just have a static mesh of a sphere that you make visible when youâre in the air and hide your player character, and reverse it when you land. This doesnât take into account falling naturally or changing your collisions so youâd have more to do, but youâd definitely be better off learning the animation state machines so you can control these actions cleanly.
Hope this gets you started!
I have 4 different sets of animations that play during the jump
jumpstart, jumploop, falling, land
how would i apply it so it only activaties when JumpLoop is playing
Awesome! So you would need to look into learning animation notifies. These are basically events that get called during animations.