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: Someone who knows about CFrames, Please help

Previous Thread :: Next Thread 
Avorable is not online. Avorable
Joined: 05 Jan 2014
Total Posts: 847
06 Feb 2014 07:02 PM
I'm trying to update an old code I have.

When I wrote the code, I had no idea how to use CFrames so the code looks very weird.


1) How many Radians is Pi?
2) Is CFrame.new(0,0,0) the same as CFrame.new(Vector3.new(0,0,0))?
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
06 Feb 2014 07:02 PM
2) I dont think CFrame.new(Vector3.new(0,0,0)) works.
Report Abuse
Avorable is not online. Avorable
Joined: 05 Jan 2014
Total Posts: 847
06 Feb 2014 07:04 PM
>>DiamondBladee
Thanks, but
It was in the code and the code was working correctly.
I guess if there's no real trick there, it's probably the same thing?
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
06 Feb 2014 07:05 PM
1) There are 2pi radians in a circle.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
06 Feb 2014 07:06 PM
"1) How many Radians is Pi?"
You mean degrees? 180

"2) Is CFrame.new(0,0,0) the same as CFrame.new(Vector3.new(0,0,0))?"
Yesish, but use the first one, more efficient.
Report Abuse
Avorable is not online. Avorable
Joined: 05 Jan 2014
Total Posts: 847
06 Feb 2014 07:08 PM
Thanks.

And I have to go by radians because that's what CFrames use for Angles.
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
06 Feb 2014 07:14 PM
You don't HAVE to go by radians...

CFrame.new(0, 0 , 0) * CFrame.Angles(math.rad(-90), 0, 0)

Perfect 90 degree turn.
Report Abuse
Avorable is not online. Avorable
Joined: 05 Jan 2014
Total Posts: 847
06 Feb 2014 07:34 PM
the rad in math.rad stands for radian
that's what I was talking about
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
06 Feb 2014 07:41 PM
"You don't HAVE to go by radians...

CFrame.new(0, 0 , 0) * CFrame.Angles(math.rad(-90), 0, 0)"

Wow, you just said that -.-
That is converting it to radians, meaning you HAVE to go by radians...
Report Abuse
Ghosthunter49 is not online. Ghosthunter49
Joined: 31 Aug 2008
Total Posts: 1946
06 Feb 2014 07:43 PM
Pi is just 180 degrees. It is 3.14 radians. We are doing the unit circle.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
06 Feb 2014 07:44 PM
"about" 3.14 radians
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
06 Feb 2014 08:02 PM
@cntkillme Can;t remember where I learned it, but it works perfectly fine when I am CFraming the camera.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
06 Feb 2014 08:07 PM
because math.rad converts it into radians, meaning you are still essentially using radians, just inputting degrees in a function and returning deg*pi/180
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