I want to know that how it creates Random Movement:
FMath::FRandRange(-1, 1) * MovementRadius
FRandrange(-1, 1) is multiplied by Movement radius which is 5. So i want to know that how exactly this line’s Mechanism works… why they multiplied it to movement radius.
Just get paper and paint an axis line then mark [-1, 1] interval on it. FRandrange(-1, 1) is some ramdom point in this interval. If you multiply this by MovementRadius then you should mark [-MovementRadius, MovementRadius] and randomly get point from this interval. From Vector point of view if you get random point p1, then it corresponds to random vector from 0 point to this p1. So you get random Vector.
PS. If your interest is purely “why this way?” then there is no answer. There are so many ways to generate a random vector, that it is always up to you to decide which will be appropriate