beatpeat
(ScaryDifficultyFace)
#1
Hello devforum, I am struggling with an issue with finding the difference between 2 CFrame angles.

```
local RotChange = CFrame.Angles(Vb.CFrame.Rotation.X - V.CFrame.Rotation.X,Vb.CFrame.Rotation.Y - V.CFrame.Rotation.Y,Vb.CFrame.Rotation.Z - V.CFrame.Rotation.Z)
Part.CFrame *= CFrame.Angles(RotChange.X*i,RotChange.Y*i,RotChange.Z*i)
```

I have tried many things to find a CFrames angle, let alone subtract it from another. I made this diagram to show what I mean:

Any help is appreciated.

3 Likes

mc7oof
(oof)
#2
Not sure it will help but here is a similar topic:

and this one:

1 Like

beatpeat
(ScaryDifficultyFace)
#3
That’s orientation, I’m looking for CFrame.

1 Like

mc7oof
(oof)
#4
I think the second one answers that at the bottom.

1 Like

math.deg(math.acos(CFrame1.lookvector:Dot(CFrame2.lookvector)))

3 Likes

beatpeat
(ScaryDifficultyFace)
#6
This returns a number, I’m looking for something that returns a CFrame.Angles.

CFrame1.Rotation:ToObjectSpace(CFrame2.Rotation):ToOrientation()

4 Likes

beatpeat
(ScaryDifficultyFace)
#8
Thank you so much! It worked!!!