generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Triginometry

Previous Thread :: Next Thread 
opplo is not online. 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 is not online. 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
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
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 is not online. 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 is not online. 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
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
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 is not online. 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
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image