I want the Pawn possessed by PlayerController to fall down and stop on the ground like a tetris game, this is the function in the PlayerController:
FVector PieceLocation = GetWorld()->GetFirstPlayerController()->GetPawn()->GetActorLocation();
FRotator PieceRotation = GetWorld()->GetFirstPlayerController()->GetPawn()->GetActorRotation();
FHitResult HitResult;
PieceLocation.Z += Speed * GetWorld()->GetDeltaSeconds();
GetWorld()->GetFirstPlayerController()->GetPawn()->SetActorLocation(PieceLocation, false);
The piece falls down but it keeps falling even when it reaches the ground. I tried enabling bSweep and I also tried TeleportTo instead of SetActorLocation but nothing changes. I enabled collisions in the blueprint editor and I’m not using physics.
How can I solve that?