i want to create something like this
http://www.youtube.com/watch?v=k71-TKHZmYE (after 25 sec)
i can calculate the length of the swipe,and the position on the screen where the swipe started and ended but i am not able to add force to the arrow(which is Instantiated at run time),such that it gives me a proper feel of how a arrow is fired.
the code i am currently using to add force is
code#
if(fire) {
rigidbody.useGravity = true;
rigidbody.velocity = Vector3(fireforce,fireangle,0.0); // i know rigidbody.addforce would have been a better option but it was not giving me the desired results
}
// here fireforce and fireangle are the lenth of the swipe,and the y pos of point where the swipe ended respectively,as the point where the swipe will end will determine the angle and the length of the swipe will determine the force with which the arrow is to be fired.
can someone please help me out with this thanks in advance
Do not post on both sites, especially if you don't provide cross-links. Also, use the code button here.
– Jessy