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: Rotating a part 360

Previous Thread :: Next Thread 
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
19 Nov 2013 01:20 PM
CFrame.Angels is math.pi * 2 for 360 rotation right? Like
pi2 = math.pi * 2
Part.CFrame = Part.CFrame * CFrame.Angles(pi2, pi2, pi2)
Would change nothing right?
I can't test because Im on a iPhone atm
Report Abuse
breuning is not online. breuning
Joined: 30 Oct 2008
Total Posts: 4268
19 Nov 2013 01:37 PM
yes
Report Abuse
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
19 Nov 2013 01:59 PM
for a = 0,360 do
print(a * (math.pi/180))
end

So that would be the way to convert a number from 0 to 360 into turn? Like
for a = 0,360 do
b = a * (math.pi/180)
Part.CFrame = Part.CFrame * CFrame.Angles(b, b, b)
wait(0.03)
end

Would rotate all the way around and back to how it was?
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
19 Nov 2013 02:06 PM
I would assume so.
However I recommend you use the math.rad() function rather than math.pi/.
Report Abuse
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
19 Nov 2013 02:07 PM
Whats wrong with math.pi / whats the difference / what is math.rad()
Report Abuse
Darthnoodles98 is not online. Darthnoodles98
Joined: 02 Apr 2011
Total Posts: 418
19 Nov 2013 02:12 PM
Why do you need to turn a part 360 degrees?

coughcirclecough
Report Abuse
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
19 Nov 2013 02:18 PM
For CFraming, the number won't always be 360 its a textbox
Report Abuse
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
19 Nov 2013 02:53 PM
Well not knowing what you want

part.CFrame = part.CFrame * CFrame.Angles(360,0,0) this is probably waht you want.
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