Ball Physics - Spinning
A very important factor affecting the physics of the ball is the spin. The spin is the rotation of the ball on itself while it is moving in the air. We can distinguish between the side spin, that is obtained by kicking the ball not in the center but on its left or its right side, and the back\top spin that are obtained kicking the ball not in the center but on its bottom/top part. The side spin is responsible of the curvature of the trajectory. The back spin is responsible to increase the height of the trajectory, this is normally an undesired effect because a ball with a high back-spin will probably fly over the cross bar. The top spin, instead, causes a decrease of the height of the trajectory and it is therefore very useful when kicking a free kick that flies over the wall but soon falls down for scoring a goal.
The most important parameters controlling the spin effect in the gameplay are
BALL_SQUARE_SPIN_DECAY = 0.985 //spin decay each frame
BALL_SQUARE_SPIN_CONST = 0.152587890625 //coefficient for the side spin
I recommend to keep BALL_SQUARE_SPIN_DECAY the same and to play with the value of BALL_SQUARE_SPIN_CONST
I personally like to increase the spin, a cross is more realistic and shots are more variable, sometime they are completely missed, if the spin is incorrect, sometime they are very dangerous if the spin direction is the right one.
After some tries I decided to double the original value. BALL_SQUARE_SPIN_CONST = 0.30517578125 //coefficient for the side spin The amount of spin generated during a kick or a shot is determined by the FIFA executable. I think that many factors contribute to its value: the kind of kick used, the kind animation, the position of the player, his abilities and so on. Honestly, I didn’t find a way to control the spin of a shot or of a cross just using the gamepad. A different story for the free kicks, controlling the spin of a free kick is very deterministicbut we will come to this point later. Changing the spin constant we do not modify the amount of spin generated but we change the deflection of the trajectory of the ball, generated by the spin. Right now we have worked with the side spin but we have other parameters for affecting also the back/top spin, the most important is BALL_SQUARE_AIR_LIFT = 0.0099 //coefficient for the back and top spin Increasing this parameter you can increase the effect of top and back spin on the trajectory of the ball. Honestly I didn’t change it but you can make your own experiments. Another possibility offered by the gameplay is to change the effect of the power of a kick on the spin. It is a very normal situation that, when you kick a ball with too much power, you hit the ball at the bottom generating a lot of backspin that will make your ball to go directly in the arms of the crowd. You can increase this effect changing BALL_ROTATION_BACKSPIN_ADDITION_ON_MAX_KICK = 0.03 BALL_ROTATION_BACKSPIN_ADDITION_ON_MIN_KICK = 0.01 For example I recommend to try these new settings BALL_ROTATION_BACKSPIN_ADDITION_ON_MAX_KICK = 0.10 BALL_ROTATION_BACKSPIN_ADDITION_ON_MIN_KICK = 0.00 Now let’s consider the free kicks. As already said you can control with the gamepad the amount of spin generated by a free kick: push a button and, before to release it, direct the left stick in the direction where you want to generate the spin. Each free kick style has a set of spin parameters that can be tuned. They define the maximum amount of spin that you can generate with a free-kick, of course these settings are affected by the previous values so it is a good practice to tune them only after that you have changed the other spin parameters. The names of the parameters are self explaining, just a note about the “OPPSIDESPIN” (opposite side spin) that is the spin obtained kicking the ball with the external side of the foot (just like Roberto Carlos) and is, of course, smaller than the spin that you can obtain kicking with the internal side of the foot. With the increased constant spin I used, I found better to decrese a little bit the sidespin generated by the freekick while I have increased a little bit the top spin and the opposite side spin. DFK_SHOT_MAX_BACKSPIN = 0.03 DFK_SHOT_MAX_TOPSPIN = 0.10 DFK_SHOT_MAX_SIDESPIN = 0.06 DFK_SHOT_MAX_OPPSIDESPIN = 0.03 DFK_SHOT_MAX_DEFAULTSIDESPIN = 0.005 DFK_LOB_MAX_BACKSPIN = 0.03 DFK_LOB_MAX_TOPSPIN = 0.05 DFK_LAYOFFLOB_MAX_BACKSPIN = 0.03 DFK_LAYOFFLOB_MAX_TOPSPIN = 0.03 DFK_LAYOFFSHOT_MAX_BACKSPIN = 0.03 DFK_LAYOFFSHOT_MAX_TOPSPIN = 0.06 DFK_LAYOFFSHOT_MAX_SIDESPIN = 0.05 DFK_LAYOFFSHOT_MAX_OPPSIDESPIN = 0.01 DFK_LAYOFFSHOT_MAX_DEFAULTSIDESPIN = 0.005
| Next > |
|---|










