Do FVectors always require explicit initialisation?

I don’t know if this counts as a bug or not, but creating a new FVector (and some other types like FRotator) without calling the constructor with ForceInitToZero seems to- sometimes- fill the vector with junk.

Is this intended behaviour? It seems strange not to just be able to write FVector MyVector = FVector(), and I’ve just burnt a big chunk of time determining that if I don’t write it as FVector MyVector = FVector(ForceInitToZero) or FVector MyVector = FVector(0) I’ll get occasionally odd behaviour.

It is definitely not a bug. It is explicitly mentioned on this constructor “no initialization” and does nothing.

1 Like

Got it, thanks. Won’t be repeating that mistake again…