diff --git a/Content/Blueprints/ABP_IKBody.uasset b/Content/Blueprints/ABP_IKBody.uasset index b601fba..119dbd2 100644 Binary files a/Content/Blueprints/ABP_IKBody.uasset and b/Content/Blueprints/ABP_IKBody.uasset differ diff --git a/Source/UnrealBody/Private/Animation/IKCharacterAnimInstance.cpp b/Source/UnrealBody/Private/Animation/IKCharacterAnimInstance.cpp index 91f1fec..d6e87fe 100644 --- a/Source/UnrealBody/Private/Animation/IKCharacterAnimInstance.cpp +++ b/Source/UnrealBody/Private/Animation/IKCharacterAnimInstance.cpp @@ -119,7 +119,7 @@ void UIKCharacterAnimInstance::TraceFoot(FVector Foot, FVector* ResultLocation, void UIKCharacterAnimInstance::UpdateHeadValues() { - //Simply set head values to match camera at all times. + // Simply set head values to match camera at all times. HeadIKValues.HeadRotation = this->BodyComponent->Camera->GetComponentRotation(); HeadIKValues.HeadLocation = this->BodyComponent->Camera->GetComponentLocation(); diff --git a/Source/UnrealBody/Private/CharacterComponents/IKBodyComponent.cpp b/Source/UnrealBody/Private/CharacterComponents/IKBodyComponent.cpp index 408f999..8ef7f5f 100644 --- a/Source/UnrealBody/Private/CharacterComponents/IKBodyComponent.cpp +++ b/Source/UnrealBody/Private/CharacterComponents/IKBodyComponent.cpp @@ -61,8 +61,8 @@ void UIKBodyComponent::TickBodyMovement(float DeltaTime) // Calculate the XY distance moved float DistanceMoved = FVector::Distance( - FVector(CameraCurrentPosition.GetLocation().X, CameraCurrentPosition.GetLocation().X, 0), - FVector(LastCameraPosition.GetLocation().X, LastCameraPosition.GetLocation().X, 0) + FVector(CameraCurrentPosition.GetLocation().X, CameraCurrentPosition.GetLocation().Y, 0), + FVector(LastCameraPosition.GetLocation().X, LastCameraPosition.GetLocation().Y, 0) ); // Calculate Yaw difference diff --git a/Source/UnrealBody/Public/CharacterComponents/IKBodyComponent.h b/Source/UnrealBody/Public/CharacterComponents/IKBodyComponent.h index 7b27284..f6574be 100644 --- a/Source/UnrealBody/Public/CharacterComponents/IKBodyComponent.h +++ b/Source/UnrealBody/Public/CharacterComponents/IKBodyComponent.h @@ -33,11 +33,11 @@ class UNREALBODY_API UIKBodyComponent : public UActorComponent UCameraComponent* Camera = nullptr; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "IKBody") - float MovementThreshold = 15.0f + float MovementThreshold = 60.0f UMETA(Tooltip = "Amount of units a player's head has to move to consider it a step instead of head movement."); UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "IKBody") - float RotationThreshold = 15.0f + float RotationThreshold = 25.0f UMETA(Tooltip = "Amount of degrees player's head has to turn to consider it more than just head movement."); UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "IKBody")