Question on codemonkey's pool tutorial
ktfright
Member Posts: 964
Nice forum! Had a question for codemonkey or whoever know the answer. In the pool table tutorial, how did you make controls for aiming and shooting the cue ball?
Comments
With those I can find the angle using the vectorToAngle function, and the power based on the magnitude with a min function to limit the power. The magnitude can also be used to determine the length of the helper tool.
With the angle and magnitude, using sin/cos of the angle and multiple it by the magnitude, you can find the x/y position of the arrow, respectively.
That is the short of it. I'm a bit tired right now.
All the vital stuff from the pool table game, but no explaination yet.