Hey I wanted to know if someone could further explain the calculation that is going on here.
Vector3.ProjectOnPlane(jumpVector, Vector3.up)
I know the first argument is jumpVector which we can edit in our inspector so it might be something like (0, 3, 3) and Vector3.Up is (0,1,0). But I don’t really understand how they affect each other or how the new vector is calculated. Some kind of Pythagorean Theorem? All I know is the value is stored in projectedJumpVector and that helps draw the horizontal ray and editing the Vector3 in the inspector will do a quick calculation and edit both of them.
So I just wanted to know if someone could futher explain what that calculation looks like so i can better understand what I’m putting into the Debug.DrawRay.
Edit: I forget if it was mentioned earlier, but are we using this to calculate two vectors? x * x + y * y + z * z