Updated TempCharacter
Added Jump function which is using ACharacter and started working on custom Sneak function
This commit is contained in:
parent
19a53529e9
commit
0cf4ace43a
BIN
Content/Blueprints/Combat_UI/CombatCharacter.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Combat_UI/CombatCharacter.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/Player/BP_MyTempCharacter.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Player/BP_MyTempCharacter.uasset
(Stored with Git LFS)
Binary file not shown.
@ -38,6 +38,11 @@ void ATempCharacter::RightMoveInput(float Axis)
|
||||
AddMovementInput(UKismetMathLibrary::GetRightVector(FRotator(0, GetControlRotation().Yaw, 0)) * Axis);
|
||||
}
|
||||
|
||||
void ATempCharacter::Sneak()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Called every frame
|
||||
void ATempCharacter::Tick(float DeltaTime)
|
||||
@ -53,6 +58,8 @@ void ATempCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputCompo
|
||||
PlayerInputComponent->BindAxis(TEXT("Move Right / Left"), this, &ATempCharacter::RightMoveInput);
|
||||
PlayerInputComponent->BindAxis(TEXT("Turn Right / Left Mouse"), this, &ATempCharacter::AddControllerYawInput);
|
||||
PlayerInputComponent->BindAxis(TEXT("Look Up / Down Mouse"), this, &ATempCharacter::AddControllerPitchInput);
|
||||
PlayerInputComponent->BindAction(TEXT("Jump"), IE_Pressed, this, &ATempCharacter::Jump);
|
||||
PlayerInputComponent->BindAction(TEXT("Sneak"), IE_Pressed, this, &ATempCharacter::Sneak);
|
||||
PlayerInputComponent->BindAction("Interact", IE_Pressed, this, &ATempCharacter::KeyPressed);
|
||||
}
|
||||
|
||||
@ -62,6 +69,8 @@ void ATempCharacter::KeyPressed()
|
||||
LineTraceLogic();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Line trace logic
|
||||
void ATempCharacter::LineTraceLogic()
|
||||
{
|
||||
|
@ -25,6 +25,9 @@ protected:
|
||||
void ForwardInput(float Axis);
|
||||
void RightMoveInput(float Axis);
|
||||
|
||||
UFUNCTION()
|
||||
void Sneak();
|
||||
|
||||
public:
|
||||
// Called every frame
|
||||
virtual void Tick(float DeltaTime) override;
|
||||
@ -81,4 +84,5 @@ public:
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
bool disableTab = false;
|
||||
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user