Unity Ball Throw Like Pokemon Go with Curve Ball

Hello people of the Internet,

This is a perfect Unity tutorial for building a Pokemon Go style Game, Ball Throwing Games, Basket Ball Game, Paper Toss Game, or even a Bowling Game.

With the scripts I have provider

You will leave how to create a mouse and touch compatible game utilizing OnMouseDown events

Flick a throw an object versus Drag – only flick will actually toss the object NOT fast drag

Curving a Object when you throw it

Spinning object when Curve

Adding Particle Effects when Curving (like Pokemon Go)

Check out the video for more details.

Okey!, Let cut the small talk, we know exactly why you are here SOURCE CODE. Calm down you copy and paste programmer, let me at least give you some of the settings I use for better success. Also check out the video which has a full detailed guide.

After reviewing the settings I use, lets begin my create 3 object for this guide.

Sphere = Lets call this _ball

Another Sphere = Lets call this

Cube = Lets call this _throwController

Now adjust the _ball and _ballContainer to the size that you desire your throw object to me. (note, if you already have an object you want to throw then replace _ball with that object)

Now that _ball and _ballContainer and the same size and the size you want them to be, place them perfectly in front of your camera at the lower middle of your screen where you want it. Now make _ball a child of _ballContainer. Remove the rigidbody and collider from _ball. Remove the mesh render from _ballContainer and make sure it has a collider and rigidbody enabled on it. Turn off the use gravity on _ballContainer

Almost done with the setup.

Now lets, add the ball.cs script below on the _ballContainer and make it a prefab be dragging it and dropping it into a folder. Before you delete it from the scene, move the _throwController to match the exact location of your _ballContainer, then scale the _throwController to be about the same size as the ball. (slightly bigger is better)

Final Step – Now that you have a prefab of _ballContainer, you can delete the original from your scene. Lets finish up by adding the ThrowBallController.cs script to the _throwController. Drop the prefab in the script variable called Ball, the rest is optional. Finally, Disable the mesh renderer from _throwController so we can see right through it.

Note – the collider should remain enable only of the _throwController.

Note – _ballContainer should be the only object with a rigidbody and use gravity unchecked.

Note – _ballContainer should have a collider, but it should remain disabled. the script will enable it.

You can use what you have learned here to build a Basket Ball Throwing Game with unity, a Paper Tossing Game with unity, A Bowling Game with unity, a Pokemon Go style ball throwing Game, or Any Ball Throwing Game with Curve using Unity 3D. Unity 3D is such a powerful tool. I recommend that you check out these books on Amazon and invest in yourself.