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: What is CFrame.fromEulerAnglesXYZ?

Previous Thread :: Next Thread 
AIRX is not online. AIRX
Joined: 03 May 2009
Total Posts: 5389
20 Aug 2012 06:44 AM
Ok, so, I'm learning to script by changing existing scripts, but what does the line below mean? I understand the weld1.C1 = CFrame.new(-0.3, 1.09, 0.6), that's just where the arm is positioned in the armweld script. But I haven't got a clue what the other bit is. It doesn't seem to change anything. Is it important?


weld1.C1 = CFrame.new(-0.3, 1.09, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))

Thanks :D
Report Abuse
AIRX is not online. AIRX
Joined: 03 May 2009
Total Posts: 5389
20 Aug 2012 06:50 AM
Uhh...
Anyone alive who can help me? lol
Report Abuse
juriaan is not online. juriaan
Joined: 25 Nov 2008
Total Posts: 939
20 Aug 2012 06:55 AM
fromEulerAnglesXYZ is the same as CFrame.Angles()

fromEulerAnglesXYZ is the old name..

Report Abuse
AIRX is not online. AIRX
Joined: 03 May 2009
Total Posts: 5389
20 Aug 2012 06:56 AM
oh right

So does it rotate them then?
And can I replace the name in the script?
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
20 Aug 2012 06:57 AM
Correct, it's the exact same as CFrame.Angles. Here's an example:

game.Workspace.Brick.CFrame = game.Workspace.Brick.CFrame * CFrame.Angles(1,1,1)
Report Abuse
juriaan is not online. juriaan
Joined: 25 Nov 2008
Total Posts: 939
20 Aug 2012 06:59 AM
You can replace it with CFrame.Angles()

Angles like it says will only rotate it.

Angles has three Parameters.

Angles(xrotation, yrotation, zrotation)

So if I wanna to make a full circle at the y I will do

Game.Workspace.Part.CFrame = CFrame.Angles(0,math.rad(360), 0)


Report Abuse
AIRX is not online. AIRX
Joined: 03 May 2009
Total Posts: 5389
20 Aug 2012 07:01 AM
Just tested that one right now.
Thanks for helping me :).
Report Abuse
juriaan is not online. juriaan
Joined: 25 Nov 2008
Total Posts: 939
20 Aug 2012 07:01 AM
Not a problem.

[TOPIC CLOSED]
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
20 Aug 2012 07:02 AM
Here's a better example of a shape creating script I made:


ang = 0.5
for i = 1,63 do
p = Instance.new("Part",game.Workspace)
p.FormFactor = "Symmetric"
p.Size = Vector3.new(60,1,60)
p.BrickColor = BrickColor.random()
p.Anchored = true
p.BottomSurface = 0
p.TopSurface = 0
p.CFrame = CFrame.new(0,30,0)
p.CFrame = p.CFrame * CFrame.Angles(ang,0,0)
ang = ang + 0.05
wait()
end

This just makes the approx. size of a 60x60 multicolored cylinder.
Report Abuse
AIRX is not online. AIRX
Joined: 03 May 2009
Total Posts: 5389
20 Aug 2012 07:04 AM
@juriaan

Game.Workspace.Part.CFrame = CFrame.Angles(0,math.rad(360), 0)

Ah, I get it.

Thanks again!
Report Abuse
juriaan is not online. juriaan
Joined: 25 Nov 2008
Total Posts: 939
20 Aug 2012 07:05 AM
@Airx

If you wanna to know more about this Subject (CFrame) then visit this wiki page.

http://wiki.roblox.com/index.php/Cookbook_(Chapter_2)

Report Abuse
AIRX is not online. AIRX
Joined: 03 May 2009
Total Posts: 5389
20 Aug 2012 07:08 AM
@Ceaseless

lol that script makes a nice pattern.

I'll have to experiment with that.
Report Abuse
AIRX is not online. AIRX
Joined: 03 May 2009
Total Posts: 5389
20 Aug 2012 07:08 AM
@juriaan

Whoops, I probably should've checked there in the first place.. lol

I'll give that a read.
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
20 Aug 2012 05:10 PM
Thanks.
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