Finding the angle between 3 vectors

Hey guys! I am trying to find the angle y for these 3 points:

image

How would I find this angle, and how would I only find this angle and not angles x or z?

1 Like

Place1.rbxl (49.6 KB)

this might be what you want to achieve, please dont ask to explain because im not that good at math and used google

1 Like

If you’re not going to explain it, you might as well not post it. I want to learn, not copy.

1 Like

you can just always reverse engineer the code lol

1 Like

I can’t broβ€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž

1 Like

This would be the angle between 2 vectors with the same origin. Theres some formulas for it.
Here Vectors yx and yz.
Which are

yx = y.Position - x.Position
yz = y.Position - z.Position

Angle in radians = arccos( yx:Dot(yz) / (yx.Magnitude * yz.Magnitude) )

1 Like

Assuming you know where the points are, you can make a vector from point Y t o point X, and also one from point Y to point Z. Then take the angle between those.

This looks like a law of cosines problem. Here’s a resource if you want to learn the math behind it

You have the 3 points which means you can calculate the lengths of each side and then use one of the various formulas to find the desired angle.