#Basic Vector Math

73 messages · Page 1 of 1 (latest)

plucky shore
#

There's a lot to do with vectors

#

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

tired nebula
#

I'm asking about vector M A T H

plucky shore
#

As I said, can be to make objects follow, to know what you're looking at

tired nebula
plucky shore
#

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

tired nebula
plucky shore
#

Bro wtf

#

I gave you like 5

#

Can't give you the hundreds of things

tired nebula
plucky shore
#

You never asked for explanation?

tired nebula
#

alright im not gonna talk to you if you cant read

plucky shore
#

You literally just ask what you could do with it

#

"what's the common use" "what other things can you do with it"

tired nebula
plucky shore
#

"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

tired nebula
# plucky shore 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.

plucky shore
#

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

placid narwhal
# tired nebula I'm asking about vector **M A T H**

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 Scale input

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)
tired nebula
placid narwhal
#

So like, Acos(Vector Dot(Camera Forward,(Target Position - Player Position)) = "Angular Distance" in degrees

tired nebula
placid narwhal
#

(Plugging a Vector Dot into Acos gets you angular distance between the 2 input vectors in degrees, assuming the input vectors are normalized)

plucky shore
#

What if you don't put it into acos?

#

What do you get

placid narwhal
#

where -1 is opposites and 1 is indifferent

plucky shore
#

Isn't that good enough?

placid narwhal
#

But if you plug that into Acos, you get the angular distance in degrees

So identical is 0, perpendicular is 90, opposite is 180

placid narwhal
plucky shore
#

Oh thatt

placid narwhal
#

you dont need it but its cool

plucky shore
#

But like without acos it works too yeah

tired nebula
#

@placid narwhal what can you do with vector cross?

placid narwhal
tired nebula
placid narwhal
#

sec

tired nebula
plucky shore
#

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

tired nebula
placid narwhal
tired nebula
placid narwhal
#

A better way is to rotate (-1,0,0) by the rotation of the thing

tired nebula
placid narwhal
tired nebula
placid narwhal
#

well

#

it needs Position + (Forward * Distance)

#

this creates a postion Distance meters infront of Position

tired nebula
placid narwhal
tired nebula
placid narwhal
#

check out this thread