#Basic Vector Math
73 messages · Page 1 of 1 (latest)
Vectors can be used as directions and positions
They can be used to tp stuff, to make something follows something else, to see where someone is looking at etc
I know how vectors work as positions and rotations bro I'm not fucking stupid
I'm asking about vector M A T H
As I said, can be to make objects follow, to know what you're looking at
Why don't you explain that then instead of telling me they can be used to set positions :|
Combine with quaternions it can also be used to mane a little plane
Or a lot of stuff
Really can't say everything but it's used for A LOT
Also for more complex system like swimming, flying
then gtfo because I'm asking for examples and if you don't want to give me some then leave please
and you didn't explain them one bit
You never asked for explanation?
alright im not gonna talk to you if you cant read
You literally just ask what you could do with it
"what's the common use" "what other things can you do with it"
Follow this loop for me:
- Read the post
- Think about the definitions of the words I posted
- If you still think I didn't ask you to explain it, repeat. Else, realize.
"Give some basic" I did, "Explain the common uses" told you the common uses can be to make objects move, movements system etx
"What other stuff can you do similar" Just told you
Now please stop complaining like a military kid.
If you want every single system and how to make them it would take something like a 75 page book or more and 5 days of writing
So please use your brain
Okay, you've been in the loop for 3.25 hours, I'll just tell you.
I said "explain the common uses of that math" ; 'that math' being SOME examples, not all 75 pages worth. Just a few. Now, notice the word "explain" is not equal to the word "list". I did not ask you to list out the uses of that math, I asked you to explain them. Here is an example of what you should have said.
The part you got correct:
"One basic function of vector math is setting an object's position to a point a certain distance in front of the player."
The part you forgot:
"To do so, all you need to do is wire the player's forward vector into a vector3 scale and set the float value to the distance you want. Then, add that to the player's position, that gives you the vector3 position that you want to set the object to. For future reference, you can set the position of an object using the "Set Position" chip.
I think you're dumb.
Explaining THE MATH not the system
The math is to do system
If I explain the math I give you system
Vector Dot:
Function:
- Similarity of 2 vectors multiplied by the product of their magnitudes
Examples:
(0,1,0) dot (0,1,0) = 1(0,1,0) dot (0,-1,0) = -1(0,1,0) dot (0,0,1) = 0(0,2,0) dot (0,5,0) = 10(0,2,0) dot (0,-5,0) = -10
Vector Cross:
Function:
- Outputs a vector perpendicular to the 2 input vectors with a magnitude of the square root of the product of the input vector magnitudes
Examples:
(0,1,0) cross (0,0,1) = (1,0,0)
Vector Scale:
Function:
- Multiplies the magnitude of the input vector by the
Scaleinput
Examples:
(0,1,0) scale 2 = (0,2,0)or better written as(0,1,0) * 2 = (0,2,0)(0,2,0) scale 5 = (0,10,0)or better written as(0,2,0) * 5 = (0,10,0)
epic, what would you use each of those things for though?
Vector Dot is useful to see if a player is lookin at a position
So like, Acos(Vector Dot(Camera Forward,(Target Position - Player Position)) = "Angular Distance" in degrees
Awesome I'm gonna write that down
What's that acos for
(Plugging a Vector Dot into Acos gets you angular distance between the 2 input vectors in degrees, assuming the input vectors are normalized)
Then you get a similarity between [-1,1]
where -1 is opposites and 1 is indifferent
Isn't that good enough?
But if you plug that into Acos, you get the angular distance in degrees
So identical is 0, perpendicular is 90, opposite is 180
Depends on the situation
Oh thatt
you dont need it but its cool
But like without acos it works too yeah
@placid narwhal what can you do with vector cross?
Vector Cross(Forward Vector, Up Vector) = Right Vector
How do you get left vector then?
sec
Are you saying to multiply it by secant?
Down vector and backware vector then
Up right and forward are positive
Pretty sure that's kinda how it works
While left down and back are negative
@placid narwhal
Multiply right vector by -1
I figured
A better way is to rotate (-1,0,0) by the rotation of the thing
how is it better / are there any benefits that either has
less CPU and chips
ok epic and then are there other combinations similar to the one needed to make a gravity gun?
gravity gun doesnt need any lol
well
it needs Position + (Forward * Distance)
this creates a postion Distance meters infront of Position
I know but what other stuff like that exists
idk what you mean
what other stuff can you do with those three vector chips yknow
check out this thread