I don’t think I can explain vectors in just one post, there are so many things you can learn about vectors it’s like a huge chapter in mathematics.
Let me try and answer your questions:
First of all, the absolute most basic thing that you probably already know is that a 3d vector in UE4 is basically a variable that contains 3 float variables: x, y & z.
Get Actor Rotation returns the world pitch, yaw & roll values of an actor. The Get Forward Vector node calculates and returns the forward direction vector based on the rotation of the actor… for example if your actor has no rotation (pitch,yaw & roll = 0) then the forward direction vector will probably be 1,0,0 (meaning your actor faces directly in the X axis) and so on.
Now since you have the direction vector you can multiply it by whatever force float you want to make the actor move forward no matter what the actor rotation’s is, otherwise if you don’t use the direction vector then the actor might move sideways, diagonally etc. depending on the rotation (which is not a desirable thing in this situation).
I hope that kinda made sense… I’m not very good at this apparently lol… okay moving on.
Read answer #1 hopefully you understand what the Get Forward/Right & Up Vectors do.
The InputAxis MoveForward node returns a value between -1 and 1, (1= forward, -1= backwards) so in case you are using W & S keys it can only be 1, 0 (meaning no button is pressed) or -1.
So basically you have to multiply it with a number because adding will not give you the same result.
And yes this function is executing every frame as far as I know (even when no button is been held down).
Again, this should be pretty much answered in answer #1 but let me try and give you an example of what happens from start to finish.
Lets say your actor has a rotation of 0,45,0 (meaning it’s rotated by 45 degrees in the yaw axis), lets also say that you want the actor to be moving backwards with a force of 50 (so let’s also assume you are holding the S key down).
This is what is going to happen:
InputAxis MoveForward will return a value of -1, then we multiply it by 50, which gives us -50.
Secondly, we get the forward direction vector by plugin the Get Actor Rotation node to the Get Forward Vector node, which returns us a vector of ~ X=0.7, Y=0.7, Z=0.
Now we multiply the direction vector with our previous float of -50 which returns a vector that is equal to about -35, -35, 0… then we plug that into the velocity function which is going to add a backwards velocity of 50.
I’m sorry if this didn’t make much sense! my teaching skill is practically next to zero
Fantastic stuff, that’s cleared up a hell of a lot. Thanks so much for taking the time to write that all out! Your teaching skills are much better than you think