Hoping someone could point me in the right direction here or at least a starting point. My game play is very similar to Golf or Disc Golf. The character spawns at a fixed starting point and the player can then “Aim” left/right via arrow keys. I have a basic idle animation playing during this pre-shot period. Once aim is adjusted the player then left clicks with the mouse to initiate the start of the swing. This is where I’m having trouble. I want to real time sync a swing animation I have to the motion of the player’s mouse movement input. So immediately as the player drags/pulls their mouse back the animation frames play based on mouse movement. Pretty much exactly how you can scrub an animation in Persona.
Ideally, I would want to use separate Backswing and Downswing animations blended. The power of the swing would be dictated by how far back the player pulled the mouse back up to a max position based on end of the Backswing animation. Then the player would push the mouse in the opposite direction for the Downswing animation movement. Just looking to get a basic setup at this point but eventually I would like to include a calculation that factors the rate or pace of motion during the Downswing as an additional impact on the total overall power output. My hope is that this can act as a way to implement an extra level of feel to the swing motion.
So in essence the game play is quite simple. Spawn at defined start point, aim, left click and then swing mouse to hit shot, auto-advance character to position where the ball came to rest from previous shot and the play next shot until finally putting ball in target to finish the first level or in golf terms it would be “hole”.