Different math

Location += TargetLocation.GetSafeNormal();

This works without converting to world space

2 Likes

Almost what I implemented. Tried what you had and it didn’t work.

I used

FVector Direction = TargetLocation.GetSafeNormal();

Full function if statment is:

if (HasAuthority())
	{
		FVector Location = GetActorLocation();
		//FVector GlobalTargetLocation = GetTransform().TransformPosition(TargetLocation);
		FVector Direction = TargetLocation.GetSafeNormal();
		Location += MoveSpeed * DeltaTime * Direction;
		SetActorLocation(Location);
	}

This allowed me to keep in local space. Might tweek it a bit more.

1 Like

Privacy & Terms