I know in math class that Sin is Opp over Hyp, Cos is Opp over Adj, and Tan is Adj over hyp, but How do I use that in Roblox?
Lets say I have Brick A. Brick A is facing 20 degrees. Brick B is 10 studs away (hypotenuse) from Brick A, and its in line to where brick A is facing.
How can I use Sin / Cos / Tan in roblox to find measurements only having information of the Angle of Brick A and the Hypotenuse?
Thanks!
This is quite a complicated concept in Roblox, however it is quite simple. At first I thought you have to come up/research the actual formula (which I'm sure would take hours) on sin, cos and tan. However Lua has already added trigonometry in scripting.
Trigonometry is purely based upon 3 special functions:
math.sin() math.cos() math.tan()
Yep it's that simple :D
Consider those 3 functions as the same key you see in a scientific calculator.
For further detail, you can go to this site: http://wiki.roblox.com/index.php?title=Trigonometry as it also provides you an example on how to use it