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
|
  |
| Joined: 22 Aug 2010 |
| Total Posts: 10885 |
|
| |
|
ScriptOn
|
  |
| Joined: 22 Aug 2010 |
| Total Posts: 10885 |
|
| |
|
|
| 13 May 2013 07:57 PM |
| B.CFrame=A.CFrame-A.Position+B.Position |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|
|
| 13 May 2013 07:58 PM |
dfq Rotation is not even a member... and DO NAT USE ANGLES. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
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 |
|
|
|
| 13 May 2013 08:02 PM |
| You guys are angle junkies. |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 13 May 2013 08:04 PM |
Mine works... I tested it and the base always faces the way my character is facing. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|