Space Plunder
Loading...
Searching...
No Matches
ALSBaseCharacter.h
Go to the documentation of this file.
1// Copyright: Copyright (C) 2022 Doğa Can Yanıkoğlu
2// Source Code: https://github.com/dyanikoglu/ALS-Community
3
4
5#pragma once
6
7#include "CoreMinimal.h"
8#include "Components/TimelineComponent.h"
11#include "Engine/DataTable.h"
12#include "GameFramework/Character.h"
17
19#include "ALSBaseCharacter.generated.h"
20
23// forward declarations
25class UAnimMontage;
27enum class EVisibilityBasedAnimTickOption : uint8;
28
31DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FRagdollStateChangedSignature, bool, bRagdollState);
32
33/*
34 * Base character class
35 */
36UCLASS(BlueprintType)
38{
39 GENERATED_BODY()
40
41public:
42 AALSBaseCharacter(const FObjectInitializer& ObjectInitializer);
43
44 UFUNCTION(BlueprintCallable, Category = "ALS|Movement")
45 FORCEINLINE class UALSCharacterMovementComponent* GetALSMovementComponent() const
46 {
47 return MyCharacterMovementComponent;
48 }
49 virtual FVector GetLeftHandGoal() const override;
50 virtual FVector GetRightHandGoal() const override;
51 virtual EALSOverlayState GetCurrentOverlayState() const override {return OverlayState;};
52 virtual bool GetIsMantling() const override;
53
54 // FORCEINLINE virtual IALSCharacterMovementInterface* GetALSCharacterMovementInterface() const override
55 // {
56 // return Cast<IALSCharacterMovementInterface>(MyCharacterMovementComponent);
57 // }
59 {
60 return Cast<IALSGravityMovementInterface>(MyCharacterMovementComponent);
61 }
62
63 UPROPERTY(EditAnywhere, Category="Debug|Gravity")
64 float GravityMultiplier = 9.8f;
65
66 virtual void Ragdoll() override;
67
68
69
70 virtual void Tick(float DeltaTime) override;
71
72 virtual void BeginPlay() override;
73
74 virtual void PostInitializeComponents() override;
75
76 virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
77
81 UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "ALS|Ragdoll System")
82 UAnimMontage* GetGetUpAnimation(bool bRagdollFaceUpState);
83
84 UFUNCTION(BlueprintCallable, Category = "ALS|Ragdoll System")
85 virtual void RagdollStart();
86
87 UFUNCTION(BlueprintCallable, Category = "ALS|Ragdoll System")
88 virtual void RagdollEnd();
89
90 UFUNCTION(BlueprintCallable, Server, Unreliable, Category = "ALS|Ragdoll System")
91 void Server_SetMeshLocationDuringRagdoll(FVector MeshLocation);
92
95 UFUNCTION(BlueprintCallable, Category = "ALS|Character States")
96 void SetMovementState(EALSMovementState NewState, bool bForce = false);
97
98 UFUNCTION(BlueprintGetter, Category = "ALS|Character States")
99 EALSMovementState GetMovementState() const { return MovementState; }
100
101 UFUNCTION(BlueprintGetter, Category = "ALS|Character States")
102 EALSMovementState GetPrevMovementState() const { return PrevMovementState; }
103
104 UFUNCTION(BlueprintCallable, Category = "ALS|Character States")
105 void SetMovementAction(EALSMovementAction NewAction, bool bForce = false);
106
107 UFUNCTION(BlueprintGetter, Category = "ALS|Character States")
108 EALSMovementAction GetMovementAction() const { return MovementAction; }
109
110 UFUNCTION(BlueprintCallable, Category = "ALS|Character States")
111 void SetStance(EALSStance NewStance, bool bForce = false);
112
113 UFUNCTION(BlueprintGetter, Category = "ALS|Character States")
114 EALSStance GetStance() const { return Stance; }
115
116 UFUNCTION(BlueprintCallable, Category = "ALS|Character States")
117 void SetOverlayOverrideState(int32 NewState);
118
119 UFUNCTION(BlueprintGetter, Category = "ALS|Character States")
120 int32 GetOverlayOverrideState() const { return OverlayOverrideState; }
121
122 UFUNCTION(BlueprintCallable, Category = "ALS|Character States")
123 void SetGait(EALSGait NewGait, bool bForce = false);
124
125 UFUNCTION(BlueprintGetter, Category = "ALS|Character States")
126 EALSGait GetGait() const { return Gait; }
127
128 UFUNCTION(BlueprintGetter, Category = "ALS|CharacterStates")
129 EALSGait GetDesiredGait() const { return DesiredGait; }
130
131 UFUNCTION(BlueprintCallable, Category = "ALS|Character States")
132 virtual void SetRotationMode(EALSRotationMode NewRotationMode, bool bForce = false);
133
134 UFUNCTION(BlueprintCallable, Server, Reliable, Category = "ALS|Character States")
135 void Server_SetRotationMode(EALSRotationMode NewRotationMode, bool bForce);
136
137 UFUNCTION(BlueprintGetter, Category = "ALS|Character States")
138 EALSRotationMode GetRotationMode() const { return RotationMode; }
139
140 UFUNCTION(BlueprintCallable, Category = "ALS|Character States")
141 virtual void SetViewMode(EALSViewMode NewViewMode, bool bForce = false);
142
143 UFUNCTION(BlueprintCallable, Server, Reliable, Category = "ALS|Character States")
144 void Server_SetViewMode(EALSViewMode NewViewMode, bool bForce);
145
146 UFUNCTION(BlueprintGetter, Category = "ALS|Character States")
147 EALSViewMode GetViewMode() const { return ViewMode; }
148
149 UFUNCTION(BlueprintCallable, Category = "ALS|Character States")
150 void SetOverlayState(EALSOverlayState NewState, bool bForce = false);
151
152 UFUNCTION(BlueprintCallable, Category = "ALS|Character States")
153 void SetGroundedEntryState(EALSGroundedEntryState NewState);
154
155 UFUNCTION(BlueprintCallable, Server, Reliable, Category = "ALS|Character States")
156 void Server_SetOverlayState(EALSOverlayState NewState, bool bForce);
157
158 UFUNCTION(BlueprintGetter, Category = "ALS|Character States")
159 EALSOverlayState GetOverlayState() const { return OverlayState; }
160
161 UFUNCTION(BlueprintGetter, Category = "ALS|Character States")
162 EALSGroundedEntryState GetGroundedEntryState() const { return GroundedEntryState; }
163
166 UFUNCTION(BlueprintCallable, Category = "ALS|Character States")
167 void EventOnLanded();
168
169 UFUNCTION(BlueprintCallable, NetMulticast, Reliable, Category = "ALS|Character States")
170 void Multicast_OnLanded();
171
173 UFUNCTION(BlueprintCallable, Category = "ALS|Character States")
174 void EventOnJumped();
175
176 UFUNCTION(BlueprintCallable, NetMulticast, Reliable, Category = "ALS|Character States")
177 void Multicast_OnJumped();
178
180 UFUNCTION(BlueprintCallable, Server, Reliable, Category = "ALS|Character States")
181 void Server_PlayMontage(UAnimMontage* Montage, float PlayRate);
182
183 UFUNCTION(BlueprintCallable, NetMulticast, Reliable, Category = "ALS|Character States")
184 void Multicast_PlayMontage(UAnimMontage* Montage, float PlayRate);
185
186 UFUNCTION(BlueprintCallable, Server, Reliable, Category = "ALS|Character States")
187 void Server_StopMontage(const float InBlendOutTime, const UAnimMontage* Montage);
188
189 UFUNCTION(BlueprintCallable, NetMulticast, Reliable, Category = "ALS|Character States")
190 void Multicast_StopMontage(const float InBlendOutTime, const UAnimMontage* Montage);
191
193 UFUNCTION(BlueprintCallable, Category = "ALS|Character States")
194 void ReplicatedRagdollStart();
195
196 UFUNCTION(BlueprintCallable, Server, Reliable, Category = "ALS|Character States")
197 void Server_RagdollStart();
198
199 UFUNCTION(BlueprintCallable, NetMulticast, Reliable, Category = "ALS|Character States")
200 void Multicast_RagdollStart();
201
202 UFUNCTION(BlueprintCallable, Category = "ALS|Character States")
203 void ReplicatedRagdollEnd();
204
205 UFUNCTION(BlueprintCallable, Server, Reliable, Category = "ALS|Character States")
206 void Server_RagdollEnd(FVector CharacterLocation);
207
208 UFUNCTION(BlueprintCallable, NetMulticast, Reliable, Category = "ALS|Character States")
209 void Multicast_RagdollEnd(FVector CharacterLocation);
210
213 UPROPERTY(BlueprintAssignable, Category = "ALS|Input")
214 FJumpPressedSignature JumpPressedDelegate;
215
216 UPROPERTY(BlueprintAssignable, Category = "ALS|Input")
217 FOnJumpedSignature OnJumpedDelegate;
218
219 UPROPERTY(BlueprintAssignable, Category = "ALS|Input")
220 FRagdollStateChangedSignature RagdollStateChangedDelegate;
221
222 UFUNCTION(BlueprintGetter, Category = "ALS|Input")
223 EALSStance GetDesiredStance() const { return DesiredStance; }
224
225 UFUNCTION(BlueprintSetter, Category = "ALS|Input")
226 void SetDesiredStance(EALSStance NewStance);
227
228 UFUNCTION(BlueprintCallable, Server, Reliable, Category = "ALS|Input")
229 void Server_SetDesiredStance(EALSStance NewStance);
230
231 UFUNCTION(BlueprintCallable, Category = "ALS|Character States")
232 void SetDesiredGait(EALSGait NewGait);
233
234 UFUNCTION(BlueprintCallable, Server, Reliable, Category = "ALS|Character States")
235 void Server_SetDesiredGait(EALSGait NewGait);
236
237 UFUNCTION(BlueprintGetter, Category = "ALS|Input")
238 EALSRotationMode GetDesiredRotationMode() const { return DesiredRotationMode; }
239
240 UFUNCTION(BlueprintSetter, Category = "ALS|Input")
241 virtual void SetDesiredRotationMode(EALSRotationMode NewRotMode);
242
243 UFUNCTION(BlueprintCallable, Server, Reliable, Category = "ALS|Character States")
244 void Server_SetDesiredRotationMode(EALSRotationMode NewRotMode);
245
248 UFUNCTION(BlueprintCallable, Category = "ALS|Rotation System")
249 void SetActorLocationAndTargetRotation(FVector NewLocation, FRotator NewRotation);
250
253 UFUNCTION(BlueprintGetter, Category = "ALS|Movement System")
254 bool HasMovementInput() const { return bHasMovementInput; }
255
256 UFUNCTION(BlueprintCallable, Category = "ALS|Movement System")
257 FALSMovementSettings GetTargetMovementSettings() const;
258
259 //- Changed
260 UFUNCTION(BlueprintCallable, Category = "ALS|Movement System")
261 virtual EALSGait GetAllowedGait() const;
262
263 UFUNCTION(BlueprintCallable, Category = "ALS|Movement System")
264 EALSGait GetActualGait(EALSGait AllowedGait) const;
265
266 UFUNCTION(BlueprintCallable, Category = "ALS|Movement System")
267 virtual bool CanSprint() const;
268
270 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "ALS|Movement System")
271 void OnBreakfall();
272 virtual void OnBreakfall_Implementation();
273
274
275 virtual float PlayReplicatedMontage(UAnimMontage* MontageToPlay, const float InPlayRate, const EMontagePlayReturnType ReturnValueType,
276 const float InTimeToStartMontageAt, const bool bStopAllMontages) override;
277
278 virtual void StopReplicatedMontage(const float InBlendOutTime, const UAnimMontage* Montage) override;
279
281 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "ALS|Movement System")
282 void Replicated_PlayMontage(UAnimMontage* Montage, float PlayRate);
283 virtual void Replicated_PlayMontage_Implementation(UAnimMontage* Montage, float PlayRate);
284
286 UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "ALS|Movement System")
287 UAnimMontage* GetRollAnimation();
288
291 UFUNCTION(BlueprintCallable, Category = "ALS|Utility")
292 float GetAnimCurveValue(FName CurveName) const;
293
294 UFUNCTION(BlueprintCallable, Category = "ALS|Utility")
295 void SetVisibleMesh(USkeletalMesh* NewSkeletalMesh);
296
297 UFUNCTION(BlueprintCallable, Server, Reliable, Category = "ALS|Utility")
298 void Server_SetVisibleMesh(USkeletalMesh* NewSkeletalMesh);
299
302 UFUNCTION(BlueprintGetter, Category = "ALS|Camera System")
303 bool IsRightShoulder() const { return bRightShoulder; }
304
305 UFUNCTION(BlueprintCallable, Category = "ALS|Camera System")
306 void SetRightShoulder(const bool bNewRightShoulder);
307
308 UFUNCTION(BlueprintGetter, Category = "ALS|Camera System")
309 bool IsAimingDownSights() const { return bAimDownSights; }
310
311 UFUNCTION(BlueprintGetter, Category = "ALS|Camera System")
312 virtual bool GetCanAimDownSights() const;
313
314 UFUNCTION(BlueprintCallable, Category = "ALS|Camera System")
315 void SetAimDownSights(const bool bNewAimDownSights);
316
317 UFUNCTION(BlueprintCallable, Category = "ALS|Camera System")
318 virtual ECollisionChannel GetThirdPersonTraceParams(FVector& TraceOrigin, float& TraceRadius);
319
320 UFUNCTION(BlueprintCallable, Category = "ALS|Camera System")
321 virtual FTransform GetThirdPersonPivotTarget();
322
323 UFUNCTION(BlueprintCallable, Category = "ALS|Camera System")
324 virtual FVector GetFirstPersonCameraTarget();
325
326 UFUNCTION(BlueprintCallable, Category = "ALS|Camera System")
327 virtual FVector GetAimDownSightCameraTarget() const;
328
329 UFUNCTION(BlueprintCallable, Category = "ALS|Camera System")
330 virtual float GetAimDownSightFOV() const;
331
332 UFUNCTION(BlueprintCallable, Category = "ALS|Camera System")
333 void GetCameraParameters(float& TPFOVOut, float& FPFOVOut, bool& bRightShoulderOut) const;
334
335 UFUNCTION(BlueprintCallable, Category = "ALS|Camera System")
336 void SetCameraBehavior(UALSPlayerCameraBehavior* CamBeh) { CameraBehavior = CamBeh; }
337
340 UFUNCTION(BlueprintGetter, Category = "ALS|Essential Information")
341 FVector GetAcceleration() const { return Acceleration; }
342
343 UFUNCTION(BlueprintGetter, Category = "ALS|Essential Information")
344 bool IsMoving() const { return bIsMoving; }
345
346 UFUNCTION(BlueprintGetter, Category = "ALS|Essential Information")
347 bool GetIsFlying() const { return bIsFlying; }
348
349
350 UFUNCTION(BlueprintCallable, Category = "ALS|Essential Information")
351 FVector GetMovementInput() const;
352
353 UFUNCTION(BlueprintGetter, Category = "ALS|Essential Information")
354 float GetMovementInputAmount() const { return MovementInputAmount; }
355
356 UFUNCTION(BlueprintGetter, Category = "ALS|Essential Information")
357 float GetSpeed() const { return Speed; }
358
359 UFUNCTION(BlueprintCallable, Category = "ALS|Essential Information")
360 FRotator GetAimingRotation() const { return AimingRotation; }
361
362 UFUNCTION(BlueprintGetter, Category = "ALS|Essential Information")
363 float GetAimYawRate() const { return AimYawRate; }
364
365
368 // UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "ALS|Input")
369 virtual void ForwardMovementAction(float Value);
370
371 // UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "ALS|Input")
372 virtual void RightMovementAction(float Value);
373
374 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "ALS|Input")
375 void CameraUpAction(float Value);
376
377 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "ALS|Input")
378 void CameraRightAction(float Value);
379
380 // UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "ALS|Input")
381 virtual void JumpAction(bool bValue);
382
383 // UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "ALS|Input")
384 virtual void SprintAction(bool bValue);
385
386 // UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "ALS|Input")
387 virtual void AimAction(bool bValue);
388
389 // UFUNCTION(BlueprintCallable, Category = "ALS|Input")
390 virtual void CameraTapAction();
391
392 // UFUNCTION(BlueprintCallable, Category = "ALS|Input")
393 virtual void CameraHeldAction();
394
395 // UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "ALS|Input")
396 virtual void StanceAction();
397
398 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "ALS|Input")
399 void WalkAction();
400
401 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "ALS|Input")
402 void RagdollAction();
403
404 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "ALS|Input")
405 void VelocityDirectionAction();
406
407 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "ALS|Input")
408 void LookingDirectionAction();
409
410protected:
412 UFUNCTION(BlueprintCallable, Category = "ALS|Ragdoll System")
413 void RagdollUpdate(float DeltaTime);
414 UFUNCTION(BlueprintCallable, Category = "ALS|Ragdoll System")
415 void SetActorLocationDuringRagdoll(float DeltaTime);
416
419 virtual void OnMovementModeChanged(EMovementMode PrevMovementMode, uint8 PreviousCustomMode = 0) override;
420
421 virtual void OnMovementStateChanged(EALSMovementState PreviousState);
422
423 virtual void OnMovementActionChanged(EALSMovementAction PreviousAction);
424
425 virtual void OnStanceChanged(EALSStance PreviousStance);
426
427 virtual void OnRotationModeChanged(EALSRotationMode PreviousRotationMode);
428
429 virtual void OnGaitChanged(EALSGait PreviousGait);
430
431 virtual void OnViewModeChanged(EALSViewMode PreviousViewMode);
432
433 virtual void OnOverlayStateChanged(EALSOverlayState PreviousState);
434
435 virtual void OnVisibleMeshChanged(const USkeletalMesh* PreviousSkeletalMesh);
436
437 virtual void OnStartCrouch(float HalfHeightAdjust, float ScaledHalfHeightAdjust) override;
438
439 virtual void OnEndCrouch(float HalfHeightAdjust, float ScaledHalfHeightAdjust) override;
440
441 virtual void OnJumped_Implementation() override;
442
443 virtual void Landed(const FHitResult& Hit) override;
444
445 void OnLandFrictionReset();
446
447 void SetEssentialValues(float DeltaTime);
448
449 void UpdateCharacterMovement();
450
451 void UpdateGroundedRotation(float DeltaTime);
452
453 void UpdateInAirRotation(float DeltaTime);
454
455
458 void SmoothCharacterRotation(FRotator Target, float TargetInterpSpeed, float ActorInterpSpeed, float DeltaTime);
459
460 float CalculateGroundedRotationRate() const;
461
462 void LimitRotation(float AimYawMin, float AimYawMax, float InterpSpeed, float DeltaTime);
463
464 void SetMovementModel();
465
466 void ForceUpdateCharacterState();
467
469 UFUNCTION(Category = "ALS|Replication")
470 void OnRep_RotationMode(EALSRotationMode PrevRotMode);
471
472 UFUNCTION(Category = "ALS|Replication")
473 void OnRep_ViewMode(EALSViewMode PrevViewMode);
474
475 UFUNCTION(Category = "ALS|Replication")
476 void OnRep_OverlayState(EALSOverlayState PrevOverlayState);
477
478 UFUNCTION(Category = "ALS|Replication")
479 void OnRep_VisibleMesh(const USkeletalMesh* PreviousSkeletalMesh);
480
481protected:
482 /* Custom movement component*/
483 UPROPERTY()
484 TObjectPtr<UALSCharacterMovementComponent> MyCharacterMovementComponent;
485
487 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ALS|Optimization")
488 bool bOptimizeGroundRotation = true;
489 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ALS|Optimization")
490 bool bOptimizeAnimValues = true;
491
492 void HandleNonMovingRotation(float DeltaTime);
493
494 FALSAnimValues AnimValues;
495 IALSAnimInterface* AnimInstanceInterface;
496
501 UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "ALS|Input")
503
504 UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "ALS|Input")
505 EALSGait DesiredGait = EALSGait::Running;
506
507 UPROPERTY(EditAnywhere, BlueprintReadWrite, Replicated, Category = "ALS|Input")
509
510 UPROPERTY(EditDefaultsOnly, Category = "ALS|Input", BlueprintReadOnly)
511 float LookUpDownRate = 1.25f;
512
513 UPROPERTY(EditDefaultsOnly, Category = "ALS|Input", BlueprintReadOnly)
514 float LookLeftRightRate = 1.25f;
515
516 UPROPERTY(EditDefaultsOnly, Category = "ALS|Input", BlueprintReadOnly)
517 float RollDoubleTapTimeout = 0.3f;
518
519 UPROPERTY(Category = "ALS|Input", BlueprintReadOnly)
520 bool bBreakFall = false;
521
522 UPROPERTY(Category = "ALS|Input", BlueprintReadOnly)
523 bool bSprintHeld = false;
524
527 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "ALS|Camera System")
528 float ThirdPersonFOV = 90.0f;
529
530 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "ALS|Camera System")
531 float FirstPersonFOV = 90.0f;
532
533 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "ALS|Camera System")
534 bool bRightShoulder = false;
535
536 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "ALS|Camera System")
537 bool bAimDownSights = false;
538
539
542 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "ALS|Movement System")
543 FDataTableRowHandle MovementModel;
544
547 UPROPERTY(BlueprintReadOnly, Category = "ALS|Essential Information")
548 FVector Acceleration = FVector::ZeroVector;
549
550 UPROPERTY(BlueprintReadOnly, Category = "ALS|Essential Information")
551 bool bIsMoving = false;
552
553 UPROPERTY(BlueprintReadOnly, Category = "ALS|Essential Information")
554 bool bIsFlying = false;
555
556 UPROPERTY(BlueprintReadOnly, Category = "ALS|Essential Information")
557 bool bHasMovementInput = false;
558
559 UPROPERTY(BlueprintReadOnly, Category = "ALS|Essential Information")
560 FRotator LastVelocityRotation;
561
562 UPROPERTY(BlueprintReadOnly, Category = "ALS|Essential Information")
563 FRotator LastMovementInputRotation;
564
565 UPROPERTY(BlueprintReadOnly, Category = "ALS|Essential Information")
566 float Speed = 0.0f;
567
568 UPROPERTY(BlueprintReadOnly, Category = "ALS|Essential Information")
569 float MovementInputAmount = 0.0f;
570
571 UPROPERTY(BlueprintReadOnly, Category = "ALS|Essential Information")
572 float AimYawRate = 0.0f;
573
576 UPROPERTY(BlueprintReadOnly, Category = "ALS|Essential Information")
577 float EasedMaxAcceleration = 0.0f;
578
579 UPROPERTY(BlueprintReadOnly, Replicated, Category = "ALS|Essential Information")
580 FVector ReplicatedCurrentAcceleration = FVector::ZeroVector;
581
582 UPROPERTY(BlueprintReadOnly, Replicated, Category = "ALS|Essential Information")
583 FRotator ReplicatedControlRotation = FRotator::ZeroRotator;
584
586 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "ALS|Skeletal Mesh", ReplicatedUsing = OnRep_VisibleMesh)
587 TObjectPtr<USkeletalMesh> VisibleMesh = nullptr;
588
591 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "ALS|State Values", ReplicatedUsing = OnRep_OverlayState)
593
594 UPROPERTY(BlueprintReadOnly, Category = "ALS|State Values")
595 EALSGroundedEntryState GroundedEntryState;
596
597 UPROPERTY(BlueprintReadOnly, Category = "ALS|State Values")
599
600 UPROPERTY(BlueprintReadOnly, Category = "ALS|State Values")
602
603 UPROPERTY(BlueprintReadOnly, Category = "ALS|State Values")
605
606 UPROPERTY(BlueprintReadOnly, Category = "ALS|State Values", ReplicatedUsing = OnRep_RotationMode)
608
609 UPROPERTY(BlueprintReadOnly, Category = "ALS|State Values")
611
612 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "ALS|State Values")
614
615 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "ALS|State Values", ReplicatedUsing = OnRep_ViewMode)
617
618 UPROPERTY(BlueprintReadOnly, Category = "ALS|State Values")
619 int32 OverlayOverrideState = 0;
620
623 UPROPERTY(BlueprintReadOnly, Category = "ALS|Movement System")
625
628 UPROPERTY(BlueprintReadOnly, Category = "ALS|Rotation System")
629 FRotator TargetRotation = FRotator::ZeroRotator;
630
631 UPROPERTY(BlueprintReadOnly, Category = "ALS|Rotation System")
632 FRotator InAirRotation = FRotator::ZeroRotator;
633
634 UPROPERTY(BlueprintReadOnly, Category = "ALS|Rotation System")
635 float YawOffset = 0.0f;
636
640 UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "ALS|Breakfall System")
641 bool bBreakfallOnLand = true;
642
644 UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "ALS|Breakfall System", meta = (EditCondition ="bBreakfallOnLand"))
645 float BreakfallOnLandVelocity = 700.0f;
646
650 UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "ALS|Ragdoll System")
651 bool bReversedPelvis = false;
652
654 UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "ALS|Ragdoll System")
655 bool bRagdollOnLand = false;
656
658 UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "ALS|Ragdoll System", meta = (EditCondition ="bRagdollOnLand"))
659 float RagdollOnLandVelocity = 1000.0f;
660
661 UPROPERTY(BlueprintReadOnly, Category = "ALS|Ragdoll System")
662 bool bRagdollOnGround = false;
663
664 UPROPERTY(BlueprintReadOnly, Category = "ALS|Ragdoll System")
665 bool bRagdollFaceUp = false;
666
667 UPROPERTY(BlueprintReadOnly, Category = "ALS|Ragdoll System")
668 FVector LastRagdollVelocity = FVector::ZeroVector;
669
670 UPROPERTY(BlueprintReadOnly, Replicated, Category = "ALS|Ragdoll System")
671 FVector TargetRagdollLocation = FVector::ZeroVector;
672
673 /* Server ragdoll pull force storage*/
674 float ServerRagdollPull = 0.0f;
675
676 /* Dedicated server mesh default visibility based anim tick option*/
677 EVisibilityBasedAnimTickOption DefVisBasedTickOp;
678
679 bool bPreRagdollURO = false;
680
683 FVector PreviousVelocity = FVector::ZeroVector;
684
685 float PreviousAimYaw = 0.0f;
686
687 UPROPERTY(BlueprintReadOnly, Category = "ALS|Camera")
688 TObjectPtr<UALSPlayerCameraBehavior> CameraBehavior;
689
691 float LastStanceInputTime = 0.0f;
692
693 /* Timer to manage reset of braking friction factor after on landed event */
694 FTimerHandle OnLandedFrictionResetTimer;
695
696 /* Smooth out aiming by interping control rotation*/
697 FRotator AimingRotation = FRotator::ZeroRotator;
698
700 bool bEnableNetworkOptimizations = false;
701
702 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "ALS|Camera")
703 bool bForceEnableNetworkOptimizationsOff = false;
704
705
706private:
707 UPROPERTY()
708 TObjectPtr<UALSDebugComponent> ALSDebugComponent = nullptr;
709
710
711 void SetupCapsuleComponent() const;
712 void SetupMeshComponent() const;
713};
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FJumpPressedSignature)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FRagdollStateChangedSignature, bool, bRagdollState)
EALSGait
Definition ALSCharacterEnumLibrary.h:29
EALSViewMode
Definition ALSCharacterEnumLibrary.h:119
EALSGroundedEntryState
Definition ALSCharacterEnumLibrary.h:143
EALSMovementState
Definition ALSCharacterEnumLibrary.h:55
EALSRotationMode
Definition ALSCharacterEnumLibrary.h:97
EALSStance
Definition ALSCharacterEnumLibrary.h:108
EALSMovementAction
Definition ALSCharacterEnumLibrary.h:41
EALSOverlayState
Definition ALSCharacterEnumLibrary.h:68
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition ALSBaseCharacter.h:38
virtual FORCEINLINE IALSGravityMovementInterface * GetALSGravityMovementInterface() const override
Definition ALSBaseCharacter.h:58
virtual EALSOverlayState GetCurrentOverlayState() const override
Definition ALSBaseCharacter.h:51
Definition InteractableCharacter.h:14
Definition ALSAnimInterface.h:21
Definition ALSCharacterInterface.h:24
Definition ALSGravityMovementInterface.h:19
Definition CustomAnimInstance.h:23
Definition ALSCharacterMovementComponent.h:23
Definition ALSDebugComponent.h:17
Definition ALSPlayerCameraBehavior.h:21
EALSMovementState MovementState
Definition ALSPlayerCameraBehavior.h:28
void SetRotationMode(EALSRotationMode RotationMode)
Definition ALSPlayerCameraBehavior.cpp:10
EALSMovementAction MovementAction
Definition ALSPlayerCameraBehavior.h:31
bool bAimDownSights
Definition ALSPlayerCameraBehavior.h:43
bool bRightShoulder
Definition ALSPlayerCameraBehavior.h:55
EALSViewMode ViewMode
Definition ALSPlayerCameraBehavior.h:52
EALSStance Stance
Definition ALSPlayerCameraBehavior.h:49
EALSGait Gait
Definition ALSPlayerCameraBehavior.h:46
Definition ALSAnimationStructLibrary.h:144
Definition ALSCharacterStructLibrary.h:176
Definition ALSCharacterStructLibrary.h:233