diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index 874edb9..02da059 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -211,3 +211,33 @@ Platforms=((Windows, (SpeakerMode=Stereo))) [/Script/NavigationSystem.RecastNavMesh] bForceRebuildOnLoad=True +[/Script/Engine.PhysicsSettings] +PhysicsPrediction=(bEnablePhysicsPrediction=False,bEnablePhysicsHistoryCapture=False,MaxSupportedLatencyPrediction=1000.000000,ResimulationSettings=(bEnableResimulationErrorPositionThreshold=True,ResimulationErrorPositionThreshold=10.000000,bEnableResimulationErrorRotationThreshold=True,ResimulationErrorRotationThreshold=4.000000,bEnableResimulationErrorLinearVelocityThreshold=False,ResimulationErrorLinearVelocityThreshold=5.000000,bEnableResimulationErrorAngularVelocityThreshold=False,ResimulationErrorAngularVelocityThreshold=2.000000)) +PhysicErrorCorrection=(PingExtrapolation=0.100000,PingLimit=100.000000,ErrorPerLinearDifference=1.000000,ErrorPerAngularDifference=1.000000,MaxRestoredStateError=1.000000,MaxLinearHardSnapDistance=400.000000,PositionLerp=0.000000,AngleLerp=0.400000,LinearVelocityCoefficient=100.000000,AngularVelocityCoefficient=10.000000,ErrorAccumulationSeconds=0.500000,ErrorAccumulationDistanceSq=15.000000,ErrorAccumulationSimilarity=100.000000) +DefaultDegreesOfFreedom=Full3D +bSuppressFaceRemapTable=False +bSupportUVFromHitResults=False +bDisableActiveActors=False +bDisableKinematicStaticPairs=False +bDisableKinematicKinematicPairs=False +bDisableCCD=False +AnimPhysicsMinDeltaTime=0.000000 +bSimulateAnimPhysicsAfterReset=False +MinPhysicsDeltaTime=0.000000 +MaxPhysicsDeltaTime=0.033333 +bSubstepping=False +bSubsteppingAsync=False +bTickPhysicsAsync=False +AsyncFixedTimeStepSize=0.033333 +MaxSubstepDeltaTime=0.016667 +MaxSubsteps=6 +SyncSceneSmoothingFactor=0.000000 +InitialAverageFrameRate=0.016667 +PhysXTreeRebuildRate=10 ++PhysicalSurfaces=(Type=SurfaceType1,Name="Concrete") ++PhysicalSurfaces=(Type=SurfaceType2,Name="Metal") ++PhysicalSurfaces=(Type=SurfaceType3,Name="Dirt") +DefaultBroadphaseSettings=(bUseMBPOnClient=False,bUseMBPOnServer=False,bUseMBPOuterBounds=False,MBPBounds=(Min=(X=0.000000,Y=0.000000,Z=0.000000),Max=(X=0.000000,Y=0.000000,Z=0.000000),IsValid=False),MBPOuterBounds=(Min=(X=0.000000,Y=0.000000,Z=0.000000),Max=(X=0.000000,Y=0.000000,Z=0.000000),IsValid=False),MBPNumSubdivs=2) +MinDeltaVelocityForHitEvents=0.000000 +ChaosSettings=(DefaultThreadingModel=TaskGraph,DedicatedThreadTickMode=VariableCappedWithTarget,DedicatedThreadBufferMode=Double) + diff --git a/Content/Legumix/Ennemy/Animation/ABP_MeleeEnemyAnim.uasset b/Content/Legumix/Ennemy/Animation/ABP_MeleeEnemyAnim.uasset index 8b81e24..8344579 100644 --- a/Content/Legumix/Ennemy/Animation/ABP_MeleeEnemyAnim.uasset +++ b/Content/Legumix/Ennemy/Animation/ABP_MeleeEnemyAnim.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1979107ccdb8656133832ce07b33ff36e6573a0a0adccf890ab3ebb1a9b1662b -size 77340 +oid sha256:56915699194317ddd347ad61615f6e96171d29037828e23919ec8a16eec73288 +size 82208 diff --git a/Content/Legumix/Ennemy/MeleeEnemy/AI/Task/BTTask_DashAttack.uasset b/Content/Legumix/Ennemy/MeleeEnemy/AI/Task/BTTask_DashAttack.uasset index 15a3bd6..c1c7f18 100644 --- a/Content/Legumix/Ennemy/MeleeEnemy/AI/Task/BTTask_DashAttack.uasset +++ b/Content/Legumix/Ennemy/MeleeEnemy/AI/Task/BTTask_DashAttack.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f0cac0d4b31dcdec52e43a1494b8f0310ea5de30d09c93d6cd9c1b64d1557bd6 -size 190799 +oid sha256:89ddbfdc4086e9bfc60e3630f0f0e24b9865400762debb86997972bfba125999 +size 190176 diff --git a/Content/Legumix/Ennemy/MeleeEnemy/AIC_MeleeEnemy.uasset b/Content/Legumix/Ennemy/MeleeEnemy/AIC_MeleeEnemy.uasset index 7f87892..86e79f7 100644 --- a/Content/Legumix/Ennemy/MeleeEnemy/AIC_MeleeEnemy.uasset +++ b/Content/Legumix/Ennemy/MeleeEnemy/AIC_MeleeEnemy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:996ac1cfaff636e7359430f57a4c55a82067c764733741f1af8975318090c4db -size 320432 +oid sha256:5594e6f598a7e69e0983313aa7d44df97f8d2148fab9bc799eeab713214f84ea +size 335977 diff --git a/Content/Legumix/Ennemy/MeleeEnemy/BP_MeleeEnemy.uasset b/Content/Legumix/Ennemy/MeleeEnemy/BP_MeleeEnemy.uasset index 7585ae3..de4e7aa 100644 --- a/Content/Legumix/Ennemy/MeleeEnemy/BP_MeleeEnemy.uasset +++ b/Content/Legumix/Ennemy/MeleeEnemy/BP_MeleeEnemy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:85039bd5c0ff3e9d466d53c62d36a86ee6acbcdcc452235060e2023edd17f852 -size 288465 +oid sha256:b714b86c3bc59b8f7e1b94a4762cdfc971cf162a7bfa2e21e205c5a533e8bbcc +size 286113 diff --git a/Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset b/Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset index fba007d..7a05faa 100644 --- a/Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset +++ b/Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3db647fee8d6b73862d61252950bc783399345ad1333d2bd1ecb58f7af75c6d9 -size 102442 +oid sha256:6a566e1b2acd33b40b6381b34f87f9137fa8776b57e5117da12d0d722f13e164 +size 101090 diff --git a/Content/Legumix/Environment/Corridor/Ramp/Corridor_Ramp.uasset b/Content/Legumix/Environment/Corridor/Ramp/Corridor_Ramp.uasset index 6220f0c..dee43f2 100644 --- a/Content/Legumix/Environment/Corridor/Ramp/Corridor_Ramp.uasset +++ b/Content/Legumix/Environment/Corridor/Ramp/Corridor_Ramp.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d27a64394a7930bddd7d5df85893187f002275a47ab97e9f92510f5af6c032db -size 65741 +oid sha256:073f0988d6ab68b4d3fb10341c810340a364448d7fdc01e89429f4de42265b5b +size 66414 diff --git a/Content/Legumix/Environment/PM_Concrete.uasset b/Content/Legumix/Environment/PM_Concrete.uasset new file mode 100644 index 0000000..9ab0c0c --- /dev/null +++ b/Content/Legumix/Environment/PM_Concrete.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39f751210ea6390dc76521c6498882219a81d01b13d096af0960e33754ce333b +size 1448 diff --git a/Content/Legumix/Environment/PM_Dirt.uasset b/Content/Legumix/Environment/PM_Dirt.uasset new file mode 100644 index 0000000..30f53bb --- /dev/null +++ b/Content/Legumix/Environment/PM_Dirt.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fdf0e51e8e1cb1494d2074475565c7d44afe2d2c0ff94e41c88c55667757152b +size 1428 diff --git a/Content/Legumix/Environment/PM_Metal.uasset b/Content/Legumix/Environment/PM_Metal.uasset new file mode 100644 index 0000000..e113b26 --- /dev/null +++ b/Content/Legumix/Environment/PM_Metal.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c288174baa79fd183016d338e1a35d2a777b3ee669c686609168af81086e353 +size 1433 diff --git a/Content/Legumix/Levels/LVL_00.umap b/Content/Legumix/Levels/LVL_00.umap index b283107..34f702a 100644 --- a/Content/Legumix/Levels/LVL_00.umap +++ b/Content/Legumix/Levels/LVL_00.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d7dc221bff32a83b0babd6af8dc485f118e2633e1ea5f1103c6735aa8fec73d1 -size 173196 +oid sha256:3982f76af1eecb291541ae5d50861c5a8aaa43df6c1d5224c000370ddfe1fb2f +size 144342 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_5CE99485.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_5CE99485.uasset index d32a6d6..f38811d 100644 --- a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_5CE99485.uasset +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_5CE99485.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d65d7e184409035ed03d17c2b6f0184f2276df1416c25e5f8ba30698f045c59 -size 480612 +oid sha256:76d20f9216f4ac9b2ca6d711b23a627636d52b9bea74241b3424508d33f323ad +size 480819 diff --git a/Content/Legumix/Player/BP_Play.uasset b/Content/Legumix/Player/BP_Play.uasset index e500e1d..e2c603a 100644 --- a/Content/Legumix/Player/BP_Play.uasset +++ b/Content/Legumix/Player/BP_Play.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:973fb0d750dde56316e316c53ae8a39f1afba4726b68b700caaea1f09d6d519d -size 289 +oid sha256:e5c422bf6ba1bc88535fa1d525ee7803921caa85b1a3dc33e41719507e8d30f8 +size 940995 diff --git a/Source/LegumeMix/Private/Player/LMMovementComponent.cpp b/Source/LegumeMix/Private/Player/LMMovementComponent.cpp index 5161537..312dc05 100644 --- a/Source/LegumeMix/Private/Player/LMMovementComponent.cpp +++ b/Source/LegumeMix/Private/Player/LMMovementComponent.cpp @@ -157,6 +157,7 @@ void ULMMovementComponent::EnterSlide() bWantsToCrouch = true; Velocity += Velocity.GetSafeNormal2D() * SlideEnterImpulse; SetMovementMode(EMovementMode::MOVE_Custom, ECustomMovementModes::ECMM_Sliding); + OnSlideStarted.Broadcast(); } void ULMMovementComponent::ExitSlide() @@ -167,6 +168,7 @@ void ULMMovementComponent::ExitSlide() FHitResult Hit; SafeMoveUpdatedComponent(FVector::ZeroVector, NewRotation, true, Hit); SetMovementMode(EMovementMode::MOVE_Walking); + OnSlideEnded.Broadcast(); } void ULMMovementComponent::PhysSlide(float DeltaTime, int32 Iterations) diff --git a/Source/LegumeMix/Private/Player/LMPlayer.cpp b/Source/LegumeMix/Private/Player/LMPlayer.cpp index 7ea275e..f467716 100644 --- a/Source/LegumeMix/Private/Player/LMPlayer.cpp +++ b/Source/LegumeMix/Private/Player/LMPlayer.cpp @@ -171,7 +171,9 @@ void ALMPlayer::FireBullets(const FLMBulletInfo Settings) ShotVector = UKismetMathLibrary::RandomUnitVectorInConeInDegreesFromStream(SpreadStream, Settings.Direction, Settings.Spread); EndLocation = Settings.Origin + (ShotVector * Settings.MaxDistance); - const bool HasHit = GetWorld()->LineTraceSingleByChannel(OutHit, Settings.Origin, EndLocation, TRACE_BULLET); + FCollisionQueryParams Params; + Params.bReturnPhysicalMaterial = true; + const bool HasHit = GetWorld()->LineTraceSingleByChannel(OutHit, Settings.Origin, EndLocation, TRACE_BULLET, Params); #if WITH_EDITOR if (bDrawBulletDebug) @@ -308,6 +310,7 @@ void ALMPlayer::DoLedgeGrabCheck() FVector TeleportLocation = FVector(Hit.Location.X, Hit.Location.Y, Hit.Location.Z + GetCapsuleComponent()->GetScaledCapsuleHalfHeight()); SetActorLocation(TeleportLocation, false, nullptr, ETeleportType::ResetPhysics); + OnLedgeGrab(); } } diff --git a/Source/LegumeMix/Public/Player/LMMovementComponent.h b/Source/LegumeMix/Public/Player/LMMovementComponent.h index ed1f5e2..8aee08e 100644 --- a/Source/LegumeMix/Public/Player/LMMovementComponent.h +++ b/Source/LegumeMix/Public/Player/LMMovementComponent.h @@ -10,6 +10,11 @@ class ALMPlayer; + +DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnSlideStartedSignature); +DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnSlideEndedSignature); + + // See https://www.youtube.com/playlist?list=PLXJlkahwiwPmeABEhjwIALvxRSZkzoQpk UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent)) class LEGUMEMIX_API ULMMovementComponent : public UCharacterMovementComponent @@ -71,6 +76,11 @@ public: UFUNCTION(BlueprintCallable, Category="Legumix|Slide") void CrouchToggle(bool Toggle); + UPROPERTY(BlueprintAssignable, Category=Legumix) + FOnSlideStartedSignature OnSlideStarted; + UPROPERTY(BlueprintAssignable, Category=Legumix) + FOnSlideEndedSignature OnSlideEnded; + public: UPROPERTY(Transient) TObjectPtr PlayerCharacterOwner; diff --git a/Source/LegumeMix/Public/Player/LMPlayer.h b/Source/LegumeMix/Public/Player/LMPlayer.h index 50d7c22..38eb4db 100644 --- a/Source/LegumeMix/Public/Player/LMPlayer.h +++ b/Source/LegumeMix/Public/Player/LMPlayer.h @@ -111,6 +111,9 @@ public: UFUNCTION() void MovementChanged(ACharacter* Character, EMovementMode PrevMovementMode, uint8 PreviousCustomMode); + UFUNCTION(BlueprintImplementableEvent, Category=Legumix) + void OnLedgeGrab(); + UFUNCTION(BlueprintCallable) void DoLedgeGrabCheck();