- Home /
How do I create a soccer penalty shootout in Unity 3D?
Hi,
I am a student and I want to create a soccer penalty shootour in Unity 3D. In my game, I want a character to kick a soccer goal into a goal being protected by a goalkeeper. Also, I want the game to be set in a soccer stadium. Does anyone have any ideas on how I should start to create my game?
Answer by Graham-Dunnett · Oct 04, 2012 at 12:37 PM
Create a 3d model of a football stadium. Use a popular modelling package like 3dsmax. Bear in mind that you probably don't need a whole stadium.
Create a 3d model of a football player. Use a popular modelling package like 3dsmax. Aim for a few thousand polys.
Create a 3d model of a goalie. Use a popular modelling package like 3dsmax. Aim for a few thousand polys.
Book some time in a mo-cap studio, hire an actor, ideally a footballer, who can make penalty kicks and goal saves, and capture the animation data from the session. Clean up the mo-cap data and break it into clips you can use in Unity. (Idle animations for goalie and player, player starts to run, player running, player kicking a ball, player celebrating, player shaking his head, player jogging back towards centre circle, goalie sliding towards a ball, goalie diving towards a ball, goalie standing up from floor etc) Look through the data at http://mocap.cs.cmu.edu/ in case there is anything useful. You'll probably want fbx versions.
While you are doing that, Unity should have released Unity 4.0 which has some awesome new animation features called Mecanim. Mecanim will allow you to create the states that your footballer and goalie will need to be in, and manage the blend trees for you.
You can then get on with the interface that you need. Your player is going to need to run towards the ball, and kick with a certain strength and direction. Meanwhile, you will need to write code that mimics what the goalie is doing, so, predicting which way the ball will be kicked, and jump/dive in that direction. I think to keep things simple, to begin with, just get the goalie to dive in a random direction.
Good luck, and hope this helps.
Or he could just hit up $$anonymous$$ixamo.com and grab some of their soccer motions for about ten thousand dollars cheaper.
Answer by GluedBrain · Aug 24, 2014 at 03:01 AM
Here is a tutorial series on How to create a Penalty Kick Game. It might help you link text