Hi, i have an image of a snooker cue, which i want to rotate/strafe around the cue ball, so the user can hit the cue ball in any direction, and i also want the angle at which the cue ball will travel in,
how could i go about programming this?
Hi, i have an image of a snooker cue, which i want to rotate/strafe around the cue ball, so the user can hit the cue ball in any direction, and i also want the angle at which the cue ball will travel in,
how could i go about programming this?
you can rotate any image using java2d and AffineTransform.
strafing shouldnt be a problem cause that would only be movement of the picture along an axis.
but i really think the reult will look that great with an image.
to get the angle you need to track a vector representing the direction of your cue and then do some simple vector math.