- Home /
Throw a ball at a target
Hi,
I've got most of my game working, but I find that the control system for throwing a ball directed at a target destination (for iPhone) is not the most ideal setup.
The 'skill' involved in the game is directing a 'ball' to be released and land on a target.
At this point, I am using:
rigidbody.AddForce(power*normalizedDirection, ForceMode.Impulse);
in order to release the ball. power and normalizedDirection are both input variables that (right now) are being determined by the user.
However, I'm starting to notice that the way the user provides this input is not ideal.
This means that the user has too many variables to control.
Instead, I would like to 'work backwards' and SHOW the user the trajectory that the ball is set to take.
Once they are happy with the 'proposed' trajectory, they can simply release the ball, and the ball should follow the trajectory path that has been laid out (calculated) and displayed.
My goal is to have the user fairly confident that the ball will 'land' (closer to) where they expect it to land.
Sorry if this explanation is still unclear, but can anyone suggest a methodology for achieving this effect?
Thanks in advance...