The Magnitude term is quite confusing, So far i've been testing the magnitude and I'm planning on making a Radar, How would I find the magnitude between Player 2's Torso and Player 1's torso?
Magnitude is the size or length of a vector. It's also called norm by math.
In geometry, a vector is a distance (a magnitude) in a direction. The displacement (difference in position) between points A
and B
is a vector. It can be computed by subtracting their positions: To get from A
, you add the vector B - A
: A + (B - A) = B
.
Thus the distance between A
and B
is the magnitude of that displacement. In Lua, if x
and y
are two different parts, the distance between their centers will be
(x.Position - y.Position).magnitude