|
| 17 Aug 2011 04:09 PM |
| I was looking at a rocket script trying to understand how to go about making my own weapon and the only part I didnt understand was CFrame.Angles, I looked on the wiki but it has a bad way of explaining things.. |
|
|
| Report Abuse |
|
|
Fl0x
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 5169 |
|
|
| 17 Aug 2011 04:10 PM |
| It's a function, it returnes Angles. |
|
|
| Report Abuse |
|
|
Combrad
|
  |
| Joined: 18 Jul 2009 |
| Total Posts: 11025 |
|
| |
|
|
| 17 Aug 2011 04:13 PM |
It rotates bricks by radians.
~~ In Soviet Russia, scripts write you. ~~ |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2011 04:16 PM |
In the rocket script there is this line: missile.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles(math.pi/2, 0, 0)
what does multiplying CFrame.new with CFrame.Angles do? and what to the arguments int eh function mean? |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2011 04:17 PM |
Multiplying is what you use to edit CFrames, ignore it, don't think of it as actually multiplying. It gets confusing. :3
He's rotating it 180 degrees, basically.
~~ In Soviet Russia, scripts write you. ~~ |
|
|
| Report Abuse |
|
|
Combrad
|
  |
| Joined: 18 Jul 2009 |
| Total Posts: 11025 |
|
|
| 17 Aug 2011 04:19 PM |
CFrame.Angles(Radian,Radian,Radian)
Decription. Used to rotate a brick a certain amount of radians.
Suggestions math.rad(Degrees)
Usage while wait() do Part.CFrame = Part.CFrame*CFrame.new(0,math.rad(1),0) end
|
|
|
| Report Abuse |
|
|
Combrad
|
  |
| Joined: 18 Jul 2009 |
| Total Posts: 11025 |
|
|
| 17 Aug 2011 04:19 PM |
while wait() do Part.CFrame = Part.CFrame*CFrame.Angles(0,math.rad(1),0) end
Silly me. |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2011 04:20 PM |
| oh... but whats teh point of rotating it 180 degrees? its already facing the right direction... |
|
|
| Report Abuse |
|
|
Combrad
|
  |
| Joined: 18 Jul 2009 |
| Total Posts: 11025 |
|
|
| 17 Aug 2011 04:21 PM |
| Well, if you want to shoot it forwards, and its facing backwords, you need to rotate it. |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2011 04:25 PM |
| How much does a radian equal? is pi 360 degrees? |
|
|
| Report Abuse |
|
|
Combrad
|
  |
| Joined: 18 Jul 2009 |
| Total Posts: 11025 |
|
|
| 17 Aug 2011 04:25 PM |
| Honestly stick with math.rad(degrees) its alot easier to understand. |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2011 04:28 PM |
| ok, thanks for the help. I found out the reason it rotated it was becuase the long part was in y so it had to turn on the x axis for it to look right. |
|
|
| Report Abuse |
|
|