diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index 244a1d1..4d93cb2 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -6,4 +6,45 @@ AppliedTargetedHardwareClass=Desktop DefaultGraphicsPerformance=Maximum AppliedDefaultGraphicsPerformance=Maximum +[/Script/EngineSettings.GameMapsSettings] +GlobalDefaultGameMode=/Script/FF.FFGameModeBase + +[/Script/Engine.PhysicsSettings] +DefaultGravityZ=-980.000000 +DefaultTerminalVelocity=4000.000000 +DefaultFluidFriction=0.300000 +SimulateScratchMemorySize=262144 +RagdollAggregateThreshold=4 +TriangleMeshTriangleMinAreaThreshold=5.000000 +bEnableAsyncScene=False +bEnableShapeSharing=False +bEnablePCM=False +bWarnMissingLocks=True +bEnable2DPhysics=False +LockedAxis=Invalid +DefaultDegreesOfFreedom=Full3D +BounceThresholdVelocity=200.000000 +FrictionCombineMode=Average +RestitutionCombineMode=Average +MaxAngularVelocity=3600.000000 +MaxDepenetrationVelocity=0.000000 +ContactOffsetMultiplier=0.010000 +MinContactOffset=0.000100 +MaxContactOffset=1.000000 +bSimulateSkeletalMeshOnDedicatedServer=True +DefaultShapeComplexity=CTF_UseSimpleAndComplex +bDefaultHasComplexCollision=True +bSuppressFaceRemapTable=False +bSupportUVFromHitResults=False +bDisableActiveActors=False +bDisableCCD=False +MaxPhysicsDeltaTime=0.033333 +bSubstepping=False +bSubsteppingAsync=False +MaxSubstepDeltaTime=0.016667 +MaxSubsteps=6 +SyncSceneSmoothingFactor=0.000000 +AsyncSceneSmoothingFactor=0.990000 +InitialAverageFrameRate=0.016667 + diff --git a/Config/DefaultGame.ini b/Config/DefaultGame.ini index 3d36bc4..8088238 100644 --- a/Config/DefaultGame.ini +++ b/Config/DefaultGame.ini @@ -1,2 +1,4 @@ [/Script/EngineSettings.GeneralProjectSettings] ProjectID=74F3BE204DEAF9802BD6C8BB52249C58 +ProjectName=FF + diff --git a/Content/Blueprints/FFCharacterBase.uasset b/Content/Blueprints/FFCharacterBase.uasset new file mode 100644 index 0000000..55d3bce --- /dev/null +++ b/Content/Blueprints/FFCharacterBase.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c38495791ecc7c73c51545418bd4cc53d1e29ab39801ec27c52a7179c8b12c9 +size 20602 diff --git a/Content/FFCharacterBase.uasset b/Content/FFCharacterBase.uasset new file mode 100644 index 0000000..be8a6f5 --- /dev/null +++ b/Content/FFCharacterBase.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2271a0c07b918f797f83b1a297f5d9189e3fffb77c7dd0354c3789038096806 +size 2016 diff --git a/Content/Maps/EmptySpawn.umap b/Content/Maps/EmptySpawn.umap new file mode 100644 index 0000000..f4b3e25 --- /dev/null +++ b/Content/Maps/EmptySpawn.umap @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36a82af47742b08d020ff93a2d8298cfeefaf13fe1c6cb5f585dc81ddc29d53f +size 634992 diff --git a/Content/Maps/EmptySpawn_BuiltData.uasset b/Content/Maps/EmptySpawn_BuiltData.uasset new file mode 100644 index 0000000..f27d2d0 --- /dev/null +++ b/Content/Maps/EmptySpawn_BuiltData.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:686bc8fe939840cf4b830e302f05d59b9d13d1935b32938c05324c90dc83de1f +size 19290 diff --git a/Source/FF/FFGameModeBase.cpp b/Source/FF/FFGameModeBase.cpp index 1eacff3..6d0956f 100644 --- a/Source/FF/FFGameModeBase.cpp +++ b/Source/FF/FFGameModeBase.cpp @@ -3,6 +3,16 @@ #include "FF.h" #include "FFGameModeBase.h" - - - +AFFGameModeBase::AFFGameModeBase() : Super() +{ + static ConstructorHelpers::FClassFinder BaseCharacterClassFinder(TEXT("/Game/Blueprints/FFCharacterBase")); + if (BaseCharacterClassFinder.Succeeded()) + { + DefaultPawnClass = BaseCharacterClassFinder.Class; + } + else + { + DefaultPawnClass = ADefaultPawn::StaticClass(); + UE_LOG(LogTemp, Error, TEXT("Failed to find FFCharacterBase, check data blueprint exists")); + } +} diff --git a/Source/FF/FFGameModeBase.h b/Source/FF/FFGameModeBase.h index 7f8645e..74d5baf 100644 --- a/Source/FF/FFGameModeBase.h +++ b/Source/FF/FFGameModeBase.h @@ -12,8 +12,7 @@ UCLASS() class FF_API AFFGameModeBase : public AGameModeBase { GENERATED_BODY() - - - - + +public: + AFFGameModeBase(); }; diff --git a/Source/FF/Private/FFCharacter.cpp b/Source/FF/Private/FFCharacter.cpp index dbd160a..053e277 100644 --- a/Source/FF/Private/FFCharacter.cpp +++ b/Source/FF/Private/FFCharacter.cpp @@ -10,6 +10,11 @@ AFFCharacter::AFFCharacter() // Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need it. PrimaryActorTick.bCanEverTick = true; + // setup first person camera + CameraComponent = CreateDefaultSubobject(TEXT("FFCamera")); + CameraComponent->RelativeLocation = FVector(-39.56f, 1.75f, 64.f); + CameraComponent->SetupAttachment(GetCapsuleComponent()); + CameraComponent->bUsePawnControlRotation = true; } // Called when the game starts or when spawned diff --git a/Source/FF/Private/FFCharacter.h b/Source/FF/Private/FFCharacter.h index 63bab27..96967f9 100644 --- a/Source/FF/Private/FFCharacter.h +++ b/Source/FF/Private/FFCharacter.h @@ -10,6 +10,11 @@ class AFFCharacter : public ACharacter { GENERATED_BODY() + + // FPS camera + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true")) + class UCameraComponent* CameraComponent; + public: // Sets default values for this character's properties AFFCharacter(); @@ -25,6 +30,6 @@ public: // Called to bind functionality to input virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override; - + FORCEINLINE class UCameraComponent* GetFirstPersonCameraComponent() const { return CameraComponent; } };