Moving a ball along a vector

I am making a billiards game and I’m having trouble with hitting the cue ball in a certain direction. I have created a pointer which the user can use to choose which direction they would like to shoot but I’m stuck on how to shoot the ball in this direction. I am currently trying to use ‘cuePhys.getLinearVelocity()’ but nothing I try will work. Any ideas?

I’m really new, but shouldn’t you be able to grab the directional heading of the cue? Something like “cuePhys.getWorldRotation()”?

Yes, you need the rotation of the cue object. However, the rotation is a quaternion (or possibly a matrix). To convert the rotation to a direction vector, you need to right-multiply the rotation by a unit vector which represents the direction of the cue when it is not rotated. If it’s a quaternion you can use the Quaternion.mult() method.