|
| 30 May 2016 12:51 PM |
/(4,9) /| / | / | / _| /A_|_| (0,1) (4,1)
How do I accomplish angle A? (and no this is not for a math homework) |
|
|
| Report Abuse |
|
|
|
| 30 May 2016 12:52 PM |
u have to get atleast 2 measurements
r+://393244197r+://393244224r+://393244262 |
|
|
| Report Abuse |
|
|
|
| 30 May 2016 12:54 PM |
| Is it not possible with points? Because I'm trying to find the angle of a wedge |
|
|
| Report Abuse |
|
|
|
| 30 May 2016 12:59 PM |
I'm assuming you want to automate this with a script? In that case you use Vector2s to find the lengths of the sides both adjacent and opposite to A
Apos = Vector2.new(0,1) Bpos = Vector2.new(4,1) Cpos = Vector2.new(4,9)
Now you want to find the lengths of AB and BC: AB = (Bpos - Apos).magnitude BC = (Cpos-Bpos).magnitude
Then you simply use math.atan on the opposite side divided by the adjacent side:
math.tan(BC/AB)
This gives you the angle in radians, if you want it in degrees:
math.deg(math.tan(BC/AB))
Let me know if I managed to fail at Grade 10 math somewhere along the line...
|
|
|
| Report Abuse |
|
|
|
| 30 May 2016 01:01 PM |
| Annnd I made a dumb. I said to use atan then proceeded to use tan in my example. Atan is the correct one to use. |
|
|
| Report Abuse |
|
|
|
| 30 May 2016 01:03 PM |
figured this out, over complicated some things on my part. Thanks for the attempt though. other method:
math.atan2(part.Size.Y, part.Size.Z)*(180/math.pi) |
|
|
| Report Abuse |
|
|