- Home /
Shoot him up with a ball
I try to make a game, where the player shoot an object with a ball.
The difficult thing is to let the object avoid the ball to the left or right.
I dont know how to do that. I hope you someone can help.
Thnx
Answer by Thom Denick · Oct 09, 2010 at 05:00 PM
Assuming your object is 3D, you could make simple animations that allow your object to dodge to the left or right.
For a tutorial on creating animations on Unity, go here: http://unity3d.com/support/resources/tutorials/video-animation-view
Now, when your ball is fired, have your object play the dodge animation you have created via a script. If you don't know anything about scripting, might I recommend 3D Buzz's Unity3D Tutorial? http://www.3dbuzz.com/vbforum/sv_home.php
Hi and thank you for your answer. $$anonymous$$aybe this is a good solution. To let him go to the best direction, he must know from where the ball comes an how much space he had till the end of the screen. I must try this. Thnx