Section 13: Multiple Character Meshes - Lecture 246

A whole bunch of attemps at fixing 180 degree snap rotations
during blending of hip rotation from forward to backward or the
opposite
This commit is contained in:
charnet3d 2024-02-15 06:26:41 +01:00
parent 5a0117faf3
commit 4b56773cc8
16 changed files with 47 additions and 26 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Content/_Game/Maps/DefaultMap.umap (Stored with Git LFS)

Binary file not shown.

View File

@ -58,6 +58,15 @@ void UShooterAnimInstance::UpdateAnimationProperties(float DeltaTime)
MovementOffsetYaw = UKismetMathLibrary::NormalizedDeltaRotator(MovementRotation, AimRotation).Yaw;
// if (GEngine)
// {
// GEngine->AddOnScreenDebugMessage(0, -1, FColor::Red, FString::Printf(TEXT("MovementYaw: %f"), MovementYaw));
// GEngine->AddOnScreenDebugMessage(1, -1, FColor::Red, FString::Printf(TEXT("MovementInputYaw: %f"), MovementInputRotation.Yaw));
// GEngine->AddOnScreenDebugMessage(2, -1, FColor::Yellow, FString::Printf(TEXT("AimYaw: %f"), AimRotation.Yaw));
// GEngine->AddOnScreenDebugMessage(3, -1, FColor::Cyan, FString::Printf(TEXT("MovementOffsetYaw: %f"), MovementOffsetYaw));
// GEngine->AddOnScreenDebugMessage(4, -1, FColor::Cyan, FString::Printf(TEXT("HipRotationOffsetYaw: %f"), HipRotationOffsetYaw));
// }
if (ShooterCharacter->GetVelocity().Size() > 0)
{
LastMovementOffsetYaw = MovementOffsetYaw;

View File

@ -10,6 +10,15 @@
class AShooterCharacter;
UENUM(BlueprintType)
enum class EHipRotationState : uint8
{
EHRS_None UMETA(DisplayName = "None"),
EHRS_Forward UMETA(DisplayName = "Forward"),
EHRS_Backward UMETA(DisplayName = "Backward"),
EHRS_MAX UMETA(DisplayName = "DefaultMax")
};
UENUM(BlueprintType)
enum class EOffsetState : uint8