diff --git a/Content/Blueprints/Items/RevolverGun.uasset b/Content/Blueprints/Items/RevolverGun.uasset index 83e0745..69a1b8a 100644 Binary files a/Content/Blueprints/Items/RevolverGun.uasset and b/Content/Blueprints/Items/RevolverGun.uasset differ diff --git a/Content/Blueprints/Items/ShotGun.uasset b/Content/Blueprints/Items/ShotGun.uasset index b162f94..7482d0c 100644 Binary files a/Content/Blueprints/Items/ShotGun.uasset and b/Content/Blueprints/Items/ShotGun.uasset differ diff --git a/Content/Blueprints/Items/WinchesterGun.uasset b/Content/Blueprints/Items/WinchesterGun.uasset index d975dc1..2000146 100644 Binary files a/Content/Blueprints/Items/WinchesterGun.uasset and b/Content/Blueprints/Items/WinchesterGun.uasset differ diff --git a/Content/Levels/TestMap.umap b/Content/Levels/TestMap.umap index 859c243..42ac21b 100644 Binary files a/Content/Levels/TestMap.umap and b/Content/Levels/TestMap.umap differ diff --git a/Source/Exo/Private/Characters/Components/ShootingComponent.cpp b/Source/Exo/Private/Characters/Components/ShootingComponent.cpp index 357aade..c051a6e 100644 --- a/Source/Exo/Private/Characters/Components/ShootingComponent.cpp +++ b/Source/Exo/Private/Characters/Components/ShootingComponent.cpp @@ -114,7 +114,7 @@ void UShootingComponent::PickUpGun(UStaticMeshComponent* PickedGunMesh) { if (IsValid(CurrentGunBase) && IsValid(SecondaryGunBase)) DropGun(); - + FAttachmentTransformRules AttachmentRules(EAttachmentRule::SnapToTarget, EAttachmentRule::SnapToTarget, EAttachmentRule::KeepWorld, true); @@ -183,6 +183,7 @@ void UShootingComponent::DropGun() CurrentGunMesh->DetachFromComponent(DetachmentRules); CurrentGunMesh->SetSimulatePhysics(true); + CurrentGunMesh->SetCollisionResponseToChannel(ECC_Visibility, ECR_Block); CurrentGunMesh->bCastDynamicShadow = true; CurrentGunMesh->CastShadow = true; @@ -268,7 +269,9 @@ void UShootingComponent::StartAiming() if (IsValid(CurrentGunBase)) { PlayerCharacter->bIsAimingMode = true; - PlayerCharacter->GetCharacterMovement()->MaxWalkSpeed = PlayerCharacter->WalkSpeed * AimingMoveSpeedScale; + + if (!PlayerCharacter->bIsCrouchingMode) + PlayerCharacter->GetCharacterMovement()->MaxWalkSpeed = PlayerCharacter->WalkSpeed * AimingMoveSpeedScale; TargetFOV = CurrentGunBase->AimingFOV; OnStartedADS.Broadcast(); @@ -278,7 +281,11 @@ void UShootingComponent::StartAiming() void UShootingComponent::StopAiming() { PlayerCharacter->bIsAimingMode = false; - PlayerCharacter->GetCharacterMovement()->MaxWalkSpeed = PlayerCharacter->WalkSpeed; + + if (PlayerCharacter->bIsCrouchingMode) + PlayerCharacter->GetCharacterMovement()->MaxWalkSpeed = PlayerCharacter->CrouchSpeed; + else + PlayerCharacter->GetCharacterMovement()->MaxWalkSpeed = PlayerCharacter->WalkSpeed; TargetFOV = DefaultFOV;