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: Cloning CFrames?

Previous Thread :: Next Thread 
ScriptOn is online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
13 May 2013 07:51 PM
Suppose I wanted to take brick A's rotation CFrame, and put it into brick B's rotation CFrame, but not move the position?
Report Abuse
ScriptOn is online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
13 May 2013 07:54 PM
bumpp
Report Abuse
ScriptOn is online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
13 May 2013 07:56 PM
D:
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
13 May 2013 07:57 PM
B.CFrame=A.CFrame-A.Position+B.Position
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
13 May 2013 07:57 PM
local PartA = Game.Workspace.PartA
local PartB = Game.Workspace.PartB

local X, Y, Z = PartA.Rotation.X, PartA.Rotation.Y, PartA.Rotation.Z

PartB.CFrame = CFrame.new() * CFrame.Angles(math.rad(X), math.rad(Y), math.rad(Z))
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
13 May 2013 07:58 PM
.0.
I feel stupid.
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
13 May 2013 07:58 PM
dfq Rotation is not even a member...
and
DO NAT USE ANGLES.
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
13 May 2013 07:59 PM
Rotation is a member...
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
13 May 2013 08:00 PM
Wiki it up boi
Report Abuse
ScriptOn is online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
13 May 2013 08:00 PM
I just used rotation and they rotate randomly all over the place.
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
13 May 2013 08:02 PM
You guys are angle junkies.
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
13 May 2013 08:02 PM
That's because wiki is stupid.

If you check the properties of a part, Rotation is right under Position.
Report Abuse
ScriptOn is online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
13 May 2013 08:02 PM
@monkey, yours is being weird D: Does anyone have an efficient method? :O
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
13 May 2013 08:04 PM
Mine works...
I tested it and the base always faces the way my character is facing.
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
13 May 2013 08:04 PM
You obviously didn't implement it correctly. There is no more efficient method, I am quite sure of this.
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
13 May 2013 08:07 PM
--Using Monkey's way
A = Part1
B = Part2
C = B.Position
B.CFrame=A.CFrame
B.Position = C
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
13 May 2013 08:07 PM
Oh my god, that is terrible!!!

ROBLOX REMOVE ROTATION OR EVERYONE WILL BE SUBJECT TO VALUE-SPECIFIC ZERO VARIANCE AND GIMBAL LOCK GALORE D:
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
13 May 2013 08:09 PM
My previous post was talking about the Rotation property of BasePart, but it appears you also implemented it incorrectly. What you see is what you get,

My new siggy:
B.CFrame=A.CFrame-A.Position+B.Position
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