Game Development Reference
In-Depth Information
To find the distance YZ, we do the same, but with the x components:
YZ =8 - 2 =6
Now that YZ and XZ are known, the distance from the gunman to the target can be calcu-
lated using the Pythagorean theorem as follows:
Well within target range. Let the target be hit!
If you know the length of one of the sides of a right-angled triangle and one of the remain-
ing two angles, you can determine everything else about the triangle using trigonometry.
First, take a look at the following figure. It shows the names of each side of a right-angled
triangle.
The following is what the figure represents:
Sin(θ) = opposite/hypotenuse
Search WWH ::




Custom Search