implemented diagonal movement

This commit is contained in:
2022-01-28 21:58:04 +01:00
parent 70ef60f08e
commit 2bf072e3c6
5 changed files with 124 additions and 109 deletions
+4 -4
View File
@@ -19,8 +19,8 @@ AAdventureCameraPawn::AAdventureCameraPawn()
PrimaryActorTick.bCanEverTick = true;
ESASize = .01;
BaseScrollSpeed = 16;
ScrollAccelleration = BaseScrollSpeed * 2.4;
BaseScrollSpeed = 20;
ScrollAccelleration = BaseScrollSpeed * 3;
ESAMaxBoundSlope = 1 / (1 - (1-ESASize));
ESAMaxBoundIntercept = 1 - ESAMaxBoundSlope;
@@ -73,13 +73,13 @@ void AAdventureCameraPawn::SetupPlayerInputComponent(UInputComponent* PlayerInpu
void AAdventureCameraPawn::ScrollSide(float AxisValue)
{
float DeltaLoc = AxisValue * BaseScrollSpeed * 3;
float DeltaLoc = AxisValue * BaseScrollSpeed * 1.7;
AddActorLocalOffset(FVector(DeltaLoc, 0, 0));
}
void AAdventureCameraPawn::ScrollVert(float AxisValue)
{
float DeltaLoc = AxisValue * BaseScrollSpeed * -3;
float DeltaLoc = AxisValue * BaseScrollSpeed * -1.7;
AddActorLocalOffset(FVector(0, DeltaLoc, 0));
}