@@ -47,7 +47,7 @@ void UALSCharacterAnimInstance::NativeInitializeAnimation()
4747 Character = Cast<AALSBaseCharacter>(TryGetPawnOwner ());
4848 if (Character)
4949 {
50- Character->OnJumpedDelegate .AddDynamic (this , &UALSCharacterAnimInstance::OnJumped);
50+ Character->OnJumpedDelegate .AddUniqueDynamic (this , &UALSCharacterAnimInstance::OnJumped);
5151 }
5252}
5353
@@ -509,7 +509,7 @@ void UALSCharacterAnimInstance::SetFootOffsets(float DeltaSeconds, FName EnableF
509509 FVector ImpactNormal = HitResult.ImpactNormal ;
510510
511511 // Step 1.1: Find the difference in location from the Impact point and the expected (flat) floor location.
512- // These values are offset by the nomrmal multiplied by the
512+ // These values are offset by the normal multiplied by the
513513 // foot height to get better behavior on angled surfaces.
514514 CurLocationTarget = (ImpactPoint + ImpactNormal * Config.FootHeight ) -
515515 (IKFootFloorLoc + FVector (0 , 0 , Config.FootHeight ));
@@ -549,7 +549,7 @@ void UALSCharacterAnimInstance::TurnInPlaceCheck(float DeltaSeconds)
549549{
550550 // Step 1: Check if Aiming angle is outside of the Turn Check Min Angle, and if the Aim Yaw Rate is below the Aim Yaw Rate Limit.
551551 // If so, begin counting the Elapsed Delay Time. If not, reset the Elapsed Delay Time.
552- // This ensures the conditions remain true for a sustained peroid of time before turning in place.
552+ // This ensures the conditions remain true for a sustained period of time before turning in place.
553553 if (FMath::Abs (AimingValues.AimingAngle .X ) <= TurnInPlaceValues.TurnCheckMinAngle ||
554554 CharacterInformation.AimYawRate >= TurnInPlaceValues.AimYawRateLimit )
555555 {
@@ -646,7 +646,7 @@ void UALSCharacterAnimInstance::UpdateRotationValues()
646646 // Set the Movement Direction
647647 MovementDirection = CalculateMovementDirection ();
648648
649- // Set the Yaw Offsets. These values influence the "YawOffset" curve in the animgraph and are used to offset
649+ // Set the Yaw Offsets. These values influence the "YawOffset" curve in the AnimGraph and are used to offset
650650 // the characters rotation for more natural movement. The curves allow for fine control over how the offset
651651 // behaves for each movement direction.
652652 FRotator Delta = CharacterInformation.Velocity .ToOrientationRotator () - CharacterInformation.AimingRotation ;
@@ -764,7 +764,7 @@ float UALSCharacterAnimInstance::CalculateStandingPlayRate() const
764764
765765float UALSCharacterAnimInstance::CalculateDiagonalScaleAmount () const
766766{
767- // Calculate the Diagnal Scale Amount. This value is used to scale the Foot IK Root bone to make the Foot IK bones
767+ // Calculate the Diagonal Scale Amount. This value is used to scale the Foot IK Root bone to make the Foot IK bones
768768 // cover more distance on the diagonal blends. Without scaling, the feet would not move far enough on the diagonal
769769 // direction due to the linear translational blending of the IK bones. The curve is used to easily map the value.
770770 return DiagonalScaleAmountCurve->GetFloatValue (FMath::Abs (VelocityBlend.F + VelocityBlend.B ));
@@ -773,7 +773,7 @@ float UALSCharacterAnimInstance::CalculateDiagonalScaleAmount() const
773773float UALSCharacterAnimInstance::CalculateCrouchingPlayRate () const
774774{
775775 // Calculate the Crouching Play Rate by dividing the Character's speed by the Animated Speed.
776- // This value needs to be separate from the standing play rate to improve the blend from crocuh to stand while in motion.
776+ // This value needs to be separate from the standing play rate to improve the blend from crouch to stand while in motion.
777777 return FMath::Clamp (
778778 CharacterInformation.Speed / Config.AnimatedCrouchSpeed / Grounded.StrideBlend / GetOwningComponent ()->
779779 GetComponentScale ().Z ,
@@ -784,7 +784,7 @@ float UALSCharacterAnimInstance::CalculateLandPrediction() const
784784{
785785 // Calculate the land prediction weight by tracing in the velocity direction to find a walkable surface the character
786786 // is falling toward, and getting the 'Time' (range of 0-1, 1 being maximum, 0 being about to land) till impact.
787- // The Land Prediction Curve is used to control how the time affects the final weight for a smooth blend.
787+ // The Land Prediction Curve is used to control how the time affects the final weight for a smooth blend.
788788 if (InAir.FallSpeed >= -200 .0f )
789789 {
790790 return 0 .0f ;
@@ -853,7 +853,7 @@ FALSLeanAmount UALSCharacterAnimInstance::CalculateAirLeanAmount() const
853853EALSMovementDirection UALSCharacterAnimInstance::CalculateMovementDirection () const
854854{
855855 // Calculate the Movement Direction. This value represents the direction the character is moving relative to the camera
856- // during the Looking Cirection / Aiming rotation modes, and is used in the Cycle Blending Anim Layers to blend to the
856+ // during the Looking Direction / Aiming rotation modes, and is used in the Cycle Blending Anim Layers to blend to the
857857 // appropriate directional states.
858858 if (Gait.Sprinting () || RotationMode.VelocityDirection ())
859859 {
@@ -872,7 +872,7 @@ void UALSCharacterAnimInstance::TurnInPlace(FRotator TargetRotation, float PlayR
872872 FRotator Delta = TargetRotation - CharacterInformation.CharacterActorRotation ;
873873 Delta.Normalize ();
874874 const float TurnAngle = Delta.Yaw ;
875-
875+
876876 // Step 2: Choose Turn Asset based on the Turn Angle and Stance
877877 FALSTurnInPlaceAsset TargetTurnAsset;
878878 if (Stance.Standing ())
@@ -914,7 +914,7 @@ void UALSCharacterAnimInstance::TurnInPlace(FRotator TargetRotation, float PlayR
914914 PlaySlotAnimationAsDynamicMontage (TargetTurnAsset.Animation , TargetTurnAsset.SlotName , 0 .2f , 0 .2f ,
915915 TargetTurnAsset.PlayRate * PlayRateScale, 1 , 0 .0f , StartTime);
916916
917- // Step 4: Scale the rotation amount (gets scaled in animgraph ) to compensate for turn angle (If Allowed) and play rate.
917+ // Step 4: Scale the rotation amount (gets scaled in AnimGraph ) to compensate for turn angle (If Allowed) and play rate.
918918 if (TargetTurnAsset.ScaleTurnAngle )
919919 {
920920 Grounded.RotationScale = (TurnAngle / TargetTurnAsset.AnimatedAngle ) * TargetTurnAsset.PlayRate * PlayRateScale;
0 commit comments