Hello,
Already, I want to say I’m French, so sorry if my english isn’t very good.
The function SimpleMoveToLocation doesn’t move the player:
void ATJS_CamController::MoveToLocation() {
UNavigationSystem* const NavSys = GetWorld()->GetNavigationSystem();
if (NavSys) {
FHitResult HitResult;
GetHitResultUnderCursor(ECC_Visibility, false, HitResult);
if (HitResult.bBlockingHit) {
NavSys->SimpleMoveToLocation(this, HitResult.ImpactPoint);
printLog("Moved", FColor::Green);
}
}
}
(MoveToLocation is call because the message “Moved” is showed).
Mouse’s parameters:
// Set the cursor and show it.
bShowMouseCursor = true;
DefaultMouseCursor = EMouseCursor::Crosshairs;
bEnableClickEvents = true;
bEnableMouseOverEvents = true;
I’d like know already how we can stop the movement, with Blueprint, we can use “Stop Movement” but it doesn’t exist, so I do as :
NavSys->SimpleMoveToActor(this, GetPawn());
Thanks,