   Soccer Shooting Algorithm.
  I am having a bit of a problem with how to control the direction of a ball when the player kicks it.I initially was picking a random position in the opponents goal and shooting with a fix speed.Which is not that much fun. I figured to calculate the dot product of my goals facing and and players facing so if we facing exactly the opponents goal we get dot product =1 and we don't add an error to the kick if we are facing exact opposite we get -1(the most error we can add to shooting vector). And i have a fix max error angle  I add to this vector.so when he is exactly facing the opponents goal the more accurate the ball goes. I also need to include the button press time.(the longer you hold the faster it goes).This is sort of okay.But the problem is that I do not want to pick a random position on the goal. I wanna have a some sort of control.So what would be a claver thing to do, Maybe include the facing direction of the player some how.Maybe get a vector pointing to the center of the goal  and a heading vector and get the mean of this so that we get some sort of control over the balls direction.Any help would be appreciated. Thanks    
  You can do a Sensible Soccer thing, a 'bend it like Beckham'. When you shoot, the direction of the ball can be controlled in-flight, as well as the power. That gives some curve to the trajectory making it a lot more interesting. Say you are shooting initially down to up. as you start shooting...- move the stick to the left initiates a left spin, creating a left swirve.- move the stick to the right initiates a right spin, creating a right swirve.- move the stick up generate a forward spin, creating a low fizzing shot.- move the stick down produces some back spin, creates a floating trajectory.- keeping the shoot button press generates more power (like in Mario, keeping the jump button pressed makes Mario jump higher).Of course there is a limited amount of control, it's all part of the fun of designing a nice swerve effect for your shots. The skill of the player affects how much bend and power you can produce on the ball.You could do so much in SS with just one button, and it worked great.[Edited by - oliii on April 23, 2010 4:38:21 AM];  Yeah, I love  SS. Those shots from the mid field(right or left). You'd pull the joystick back as you shoot and it would have a stronger and higher trajectory and you d pull the joystick to the right and left. That is interesting idea because I dont think you can do that with winning 11 or fifaThanks. I might add that.  Good idea.   