float DistanceMoved = FVector::Dist(StartLocation, CurrentLocation);
//Reverse direction of motion if gone too far
if (CurrentLocation.X > -1300 && PlatformVelocity.X < 0) {
PlatformVelocity = -PlatformVelocity;
}
SetActorLocation(CurrentLocation);
}
So basically I tried to challenge my self to do it before but it didnt work so I’m doing it the videos way but would love if someone explained why it wouldnt work.
Thanks