I have been wondering for quite some time how magnitude works. I know it gets the range of a vector3 but it is hard to visualize the range. If I can understand magnitude it will make things easier for me with scripting new stuff. Please help me.
can’t you just create a part that’s the size of the distance? (either put the vector3 or the magnitude)
The magnitude of a vector is simply the length of the vector.
We break our movement into 3 components, the distance traveled along each axis. We have a 3D world so there are 3 components for the axes.
The pythagorean theorem is the 2D version of calculating distance using 2 components, a^2 + b^2 = c^2. Imagine a and b are the x, y components of a 2D vector. Thus our magnitude here is the square root of c^2.
We extend the theorem to one more dimension, thus a formula for magnitude of a 3D vector v [X , Y, Z ] = x^2 + y^2 + z^2 = c^2 We use this format | v | for mathematical symbol of magnitude of vector v, so square root of c^2 = magnitude of vector v = | v | or || v ||
Objects in Roblox have a CFrame data structure which contains two vectors: a Position Vector (p) and a LookVector. The Position Vector is the location of the object from the world origin 0, 0