Does the Forward Vector of a camera depend on its location?

Hi!

I have a question about Vectors. Does the forward vector value depend on the location? If I get the Forward Vector of a camera, does it value depend on the camera’s location? Now, the camera is at (0, 0, 100), but I need the forward vector for the location of (0, 0, 0).

FVector CameraLocation = Camera->GetComponentLocation();
FVector CameraForwardVector = 
	UKismetMathLibrary::GetForwardVector(Camera->GetComponentRotation());

Thanks!

No.
The Forward Vector of an object does not depend on its location.
It depends only on the object’s rotation and is always a normal vector. (with length 1)
As seen in your code snippet you are providing only the Camera->GetComponentRotation() as a parameter to the function.

Thanks.

I thought that since the Z component of the position was 100, it would affect the Z component of the forward vector if I change it to 0.

Nope. The position and orientation are unrelated.
Having Z component in your forward vector means that you have some pitch in your rotation.
Forward vector with Z of +1.0 means that the X axis of the object (the front of the camera in your case) is pointing straight up while Z of -1.0 means it is facing straight down.

Position is irrelevant unless you are constantly tracking another object or point in space (in which case the camera will rotate as it moves)