of     1   

adark
#59539664Wednesday, December 14, 2011 2:11 AM GMT

I know, I know, wrong forum, but nobody on Scripting Helpers knows the answer. Part2 is rotated 18 degrees and positioned for a perfect fit with Part1. I now want to add Part3, with the exact same relative rotation and position as Part2 is to Part1, for a total of 36 degrees of rotation from Part1 to Part3. I know how to get the relative CFrame of Part2 to Part1 using :toObjectSpace, but how do I make this the relative CFrame of Part3 to Part2?
[rfa#hidefromsearch]
#59539796Wednesday, December 14, 2011 2:13 AM GMT

[rfa#hidefromsearch]
adark
#59539845Wednesday, December 14, 2011 2:14 AM GMT

...What? Who is TheCapacitor?
[rfa#hidefromsearch]
#59539968Wednesday, December 14, 2011 2:15 AM GMT

[rfa#hidefromsearch]
Sharksie
#59540012Wednesday, December 14, 2011 2:16 AM GMT

TheCapacitor is a passive two-terminal electrical component used to store energy in an electric field.
blockoo
#59540091Wednesday, December 14, 2011 2:17 AM GMT

Or the user who enters an uncontrollable fit of rage whenever he sees me.
adark
#59540125Wednesday, December 14, 2011 2:18 AM GMT

@arceus, That answer does not pertain to my question of "*Who* is TheCapacitor?" but the rather the question of "*What* is the capacitor?"
blockoo
#59540189Wednesday, December 14, 2011 2:18 AM GMT

What do you think the People browsing page is for?
adark
#59540246Wednesday, December 14, 2011 2:19 AM GMT

Having his userpage doesn't answer the question of "Who is he?"
blockoo
#59540547Wednesday, December 14, 2011 2:23 AM GMT

What more info do you want? e.e
adark
#59540571Wednesday, December 14, 2011 2:23 AM GMT

I'm going to stop this saying that I'm a moron. When I was trying to get the selection I was dragging to align with the rotated bit, I had left it rotated. I forgot that I could just select all of the stuff I was dragging on to and align it to the main axis by moving the rotated bit, solving my rotation problem. Having said that, I feel like slightly less of a moron.
[rfa#hidefromsearch]
#59540799Wednesday, December 14, 2011 2:26 AM GMT

[rfa#hidefromsearch]
blockoo
#59540992Wednesday, December 14, 2011 2:28 AM GMT

Back on topic, if I understand your question correctly: one = Vector3.new(Part1.CFrame:toEulerAnglesXYZ()) two = Vector3.new(Part2.CFrame:toEulerAnglesXYZ()) d = one - two d = Vector3.new(math.abs(d.x), math.abs(d.y), math.abs(d.z)) Part3.CFrame = part3.CFrame * CFrame.Angles(d)
blockoo
#59541050Wednesday, December 14, 2011 2:29 AM GMT

Small fix: one = Vector3.new(Part1.CFrame:toEulerAnglesXYZ()) two = Vector3.new(Part2.CFrame:toEulerAnglesXYZ()) d = two - one d = Vector3.new(math.abs(d.x), math.abs(d.y), math.abs(d.z)) Part3.CFrame = part3.CFrame * CFrame.Angles(d)
xSIXxStorage
#59541141Wednesday, December 14, 2011 2:30 AM GMT

"toEulerAnglesXYZ" AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
blockoo
#59541354Wednesday, December 14, 2011 2:33 AM GMT

Wait, I misinterpreted: one = Vector3.new(Part1.CFrame:toEulerAnglesXYZ()) two = Vector3.new(Part2.CFrame:toEulerAnglesXYZ()) d = two - one d = Vector3.new(math.abs(d.x), math.abs(d.y), math.abs(d.z)) Part3.CFrame = Part3.CFrame * CFrame.Angles(two + d)
blockoo
#59541432Wednesday, December 14, 2011 2:34 AM GMT

What's "AHHHHH" about toEulerAngles?
adark
#59541671Wednesday, December 14, 2011 2:37 AM GMT

CFrame.Angles
xSIXxStorage
#59542094Wednesday, December 14, 2011 2:44 AM GMT

"CFrame:toEulerAnglesXYZ())" THE INACCURATE PIECE OF POOP LIVESSSSSSSSSSSSSSSSSSSS.
stravant
Forum Moderator
#59542161Wednesday, December 14, 2011 2:45 AM GMT

Here's exactly what you want: Part[N].CFrame = Part[N-1].CFrame * Part[N-2].CFrame:inverse() * Part[N-1].CFrame
xSIXxStorage
#59542297Wednesday, December 14, 2011 2:47 AM GMT

^ ahhhhh yea.
blockoo
#59542570Wednesday, December 14, 2011 2:51 AM GMT

Suggest an alternative and I may agree with you.
xSIXxStorage
#59542637Wednesday, December 14, 2011 2:53 AM GMT

Use the rotation matrix. rot = CFrame.new() - CFrame.new().p
blockoo
#59542880Wednesday, December 14, 2011 2:56 AM GMT

rotation matrix < poop Why do you need 9 different matrices when you can create any possible angle with the use of only 3 of them?

    of     1