Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How to create mechanics for ball juggling(Kickerinho, Skill Twins)

Discussion in 'Scripting' started by andyblem, Apr 19, 2020.

  1. andyblem

    andyblem

    Joined:
    Nov 11, 2014
    Posts:
    26
    Hie guys. I have an idea for a game that I want to develop. Basically the game is about football free styling. The game has similar mechanics like in Kickerinho and SkillTwins2. My challenge is how do I create such game mechanics.
    From the looks of it, there's a lot of inverse kinematics involved. That means in my scripting I will be controlling the animations instead of just letting them run, maybe I have to control the speed of play or etc. That made me to think that I need a powerful asset to give me better control of the animations, something like FinalIK. I'm not sure if I'm going to need a tweening library also.
    I already have the animations with me. So what I'm more interested in is to pointed in the right direction. A simple explanation of how such mechanics can be built will suffice.

    Thank you in advance
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,798
    Hard to tell from the video what is actually controllable in the ball-juggling. Is the ball simply rising and falling through a set sequence and on a fixed path in a pre-animated order, and you are required to tap within a window to continue? That's sorta what it looks like to me.

    Either way, they have certainly done some smooth animation transitions, and likely put them together with some blending such as you could do in Unity with Mecanim.

    I'm not sure about it having IK either... it might just be simple procedural lateral offsetting of the foot blended with the animation to end up with what they get.
     
  3. andyblem

    andyblem

    Joined:
    Nov 11, 2014
    Posts:
    26
    Here is what I tried. I have a character with juggle animations. The ball is entirely controlled by physics. So what I did is to define an ik target for the left leg and right leg. Using some calculations I launch the ball to one of the ik target, the use triggers the leg to kick the ball by clicking the left side(for left leg) and right side(for right leg) of screen. It becomes a matter of timing when to tap the screen so that the appropriate leg moves to kick the ball on the ik target. Currently I play the animation with its default speed. Is there a way I can control the animation speed?