opplo
|
  |
| Joined: 09 Dec 2008 |
| Total Posts: 5320 |
|
|
| 10 Mar 2013 07:02 AM |
| I'm using the Cosine rule to find the roll of a Spaceship. But as you know the largest angle you can find in a triangle is 180. But I need it to go up to 360. To do this I need to know when the Spaceship is inverted (has an angle larger than 180 from Origin to Y). Does anyone know how I would do this? |
|
|
| Report Abuse |
|
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 10 Mar 2013 08:20 AM |
| Cosines are radians buddy, they go to 360 degrees. As far as I know you can just use cosines to find the complete roll. |
|
|
| Report Abuse |
|
|
|
| 10 Mar 2013 08:51 AM |
local sx, sy, sz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = CFRAME_VALUE_HERE:components() bank = math.atan2(m10, m11)
Source: http://wiki.roblox.com/index.php/Heading,_attitude,_and_bank |
|
|
| Report Abuse |
|
|
opplo
|
  |
| Joined: 09 Dec 2008 |
| Total Posts: 5320 |
|
|
| 10 Mar 2013 10:11 AM |
Jobro, I'm sure the cosine only goes to Pi in radions and then you convert it into degrees.
Thanks Crazyman thats what I needed. |
|
|
| Report Abuse |
|
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 10 Mar 2013 10:32 AM |
| 2pi is 360 degrees. I don't know what you learned about radians, but radians definately go to 360 degrees. |
|
|
| Report Abuse |
|
|
|
| 10 Mar 2013 11:12 AM |
| jobro, I think he thought you were trying to say that radians are measured by 360 degrees. I thought that at first too actually, but understood what you meant. |
|
|
| Report Abuse |
|
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 10 Mar 2013 11:16 AM |
What I mean is that in triangles the maximum angle is 180 degrees (tough it's still not possible to make a triangle with a 180 degrees angle, their sum is 180 degrees)
I mean that the radian circle (or how you call it in english) goes from zero to 2 * pi. 2 pi is 360 degrees.
(Circle actually goes to infinity, but effectively you can show 360 degrees on there - or 2pi radians) |
|
|
| Report Abuse |
|
|
|
| 10 Mar 2013 11:21 AM |
| Errr, the INTERNAL angles of a triangle can only be 180 on a eular plane. External angles, which is what he wants to measure, always add up to 360. |
|
|
| Report Abuse |
|
|
Mendezio
|
  |
| Joined: 24 Nov 2008 |
| Total Posts: 4392 |
|
|
| 10 Mar 2013 02:49 PM |
A = 0,1 B = 0,0 C=1,0
If C.X < 0, then the triange has rolled to the opposite side of the Y axis, allowing us to assume it has gone inverted.
Its a bit more complicated when you add three dimensions into the mix though. |
|
|
| Report Abuse |
|
|