From 17486d1b75fc1a35b87baeaea68a7579f8cdef79 Mon Sep 17 00:00:00 2001 From: aicorr Date: Sat, 15 Feb 2025 18:15:37 +0530 Subject: [PATCH] remove old file Your branch is up to date with 'origin/main'. --- Config/DefaultEngine.ini | 15 +++- Config/DefaultInput.ini | 23 ++++++ Content/LearnLevel.umap | 2 +- Content/Main.umap | 4 +- MyProject3.uproject | 3 +- Source/MyProject3/CameraFollowActor.cpp | 34 --------- Source/MyProject3/CameraFollowActor.h | 36 --------- Source/MyProject3/MyCharacter.cpp | 99 ------------------------- Source/MyProject3/MyCharacter.h | 39 ---------- Source/MyProject3/MyGameModeBase.cpp | 8 -- Source/MyProject3/MyGameModeBase.h | 14 ---- 11 files changed, 41 insertions(+), 236 deletions(-) delete mode 100644 Source/MyProject3/CameraFollowActor.cpp delete mode 100644 Source/MyProject3/CameraFollowActor.h delete mode 100644 Source/MyProject3/MyCharacter.cpp delete mode 100644 Source/MyProject3/MyCharacter.h delete mode 100644 Source/MyProject3/MyGameModeBase.cpp delete mode 100644 Source/MyProject3/MyGameModeBase.h diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index a90fd96..c914110 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -53,9 +53,19 @@ r.RayTracing=True r.Shadow.Virtual.Enable=1 [/Script/EngineSettings.GameMapsSettings] -;defines what level to be loaded by default in the editor and at playback time -EditorStartupMap=/Game/Main.Main EditorStartupMap=/Game/Main.Main +LocalMapOptions= +TransitionMap=None +bUseSplitscreen=True +TwoPlayerSplitscreenLayout=Horizontal +ThreePlayerSplitscreenLayout=FavorTop +FourPlayerSplitscreenLayout=Grid +bOffsetPlayerGamepadIds=False +GameInstanceClass=/Script/Engine.GameInstance +GameDefaultMap=/Engine/Maps/Templates/OpenWorld.OpenWorld +ServerDefaultMap=/Engine/Maps/Entry.Entry +GlobalDefaultGameMode=/Game/StarterContent/Blueprints/Deathmatch.Deathmatch_C +GlobalDefaultServerGameMode=None [/Script/UnrealEd.UnrealEdEngine] ; Remove Engine Template maps @@ -122,6 +132,7 @@ DefaultGraphicsRHI=DefaultGraphicsRHI_DX12 [/Script/Engine.Engine] +ActiveGameNameRedirects=(OldGameName="TP_ME_BlankBP",NewGameName="/Script/MyProject3") +ActiveGameNameRedirects=(OldGameName="/Script/TP_ME_BlankBP",NewGameName="/Script/MyProject3") +GameViewportClientClassName=/Script/CommonUI.CommonGameViewportClient [/Script/AndroidFileServerEditor.AndroidFileServerRuntimeSettings] bEnablePlugin=True diff --git a/Config/DefaultInput.ini b/Config/DefaultInput.ini index 27155de..f91a463 100644 --- a/Config/DefaultInput.ini +++ b/Config/DefaultInput.ini @@ -80,9 +80,32 @@ DefaultViewportMouseCaptureMode=CapturePermanently_IncludingInitialMouseDown DefaultViewportMouseLockMode=LockOnCapture FOVScale=0.011110 DoubleClickTime=0.200000 ++AxisMappings=(AxisName="ThrustForward",Scale=1.000000,Key=W) ++AxisMappings=(AxisName="ThrustForward",Scale=-1.000000,Key=S) ++AxisMappings=(AxisName="ThrustUp",Scale=1.000000,Key=E) ++AxisMappings=(AxisName="ThrustUp",Scale=-1.000000,Key=Q) ++AxisMappings=(AxisName="ThrustRight",Scale=1.000000,Key=D) ++AxisMappings=(AxisName="ThrustRight",Scale=-1.000000,Key=A) ++AxisMappings=(AxisName="Pitch",Scale=-1.000000,Key=MouseY) ++AxisMappings=(AxisName="Yaw",Scale=1.000000,Key=MouseX) ++AxisMappings=(AxisName="Roll",Scale=1.000000,Key=Right) ++AxisMappings=(AxisName="Roll",Scale=-1.000000,Key=Left) DefaultPlayerInputClass=/Script/EnhancedInput.EnhancedPlayerInput DefaultInputComponentClass=/Script/EnhancedInput.EnhancedInputComponent DefaultTouchInterface=/Engine/MobileResources/HUD/DefaultVirtualJoysticks.DefaultVirtualJoysticks -ConsoleKeys=Tilde +ConsoleKeys=Tilde +[/Script/EnhancedInput.EnhancedInputDeveloperSettings] ++DefaultMappingContexts=(InputMappingContext=None,Priority=0) +UserSettingsClass=/Script/EnhancedInput.EnhancedInputUserSettings +DefaultPlayerMappableKeyProfileClass=/Script/EnhancedInput.EnhancedPlayerMappableKeyProfile +DefaultWorldInputClass=/Script/EnhancedInput.EnhancedPlayerInput +bSendTriggeredEventsWhenInputIsFlushed=True +bEnableUserSettings=True +EnhancedInput.EnableDefaultMappingContexts=True +EnhancedInput.OnlyTriggerLastActionInChord=True +bLogOnDeprecatedConfigUsed=True +bEnableWorldSubsystem=False +EnhancedInput.bShouldLogAllWorldSubsystemInputs=False + diff --git a/Content/LearnLevel.umap b/Content/LearnLevel.umap index 54ba2f9..df74956 100644 --- a/Content/LearnLevel.umap +++ b/Content/LearnLevel.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6d5f3ea2fa7ebd7721cec1fabe421322301bee2bf0ff4baca850b120fbc50387 +oid sha256:a1a437c2a78841d38072aa2e82636e0e9aeb14879a83035edf2736f8e6a81f40 size 40163 diff --git a/Content/Main.umap b/Content/Main.umap index 25ebaff..b6339d6 100644 --- a/Content/Main.umap +++ b/Content/Main.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4abf9b0b156c9fff958be402e085e38c52282db8297cc1d1b030341a59615116 -size 74838 +oid sha256:62c8d7bee6f32472220d99a3b42b2bbcdef765fb1f4dbc6bffd906338aebbb73 +size 75661 diff --git a/MyProject3.uproject b/MyProject3.uproject index 3dbac72..bdda443 100644 --- a/MyProject3.uproject +++ b/MyProject3.uproject @@ -9,7 +9,8 @@ "Type": "Runtime", "LoadingPhase": "Default", "AdditionalDependencies": [ - "Engine" + "Engine", + "CommonUI" ] } ], diff --git a/Source/MyProject3/CameraFollowActor.cpp b/Source/MyProject3/CameraFollowActor.cpp deleted file mode 100644 index 2a78525..0000000 --- a/Source/MyProject3/CameraFollowActor.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// CameraFollowActor.cpp -#include "CameraFollowActor.h" -#include "Camera/CameraComponent.h" -#include "GameFramework/Actor.h" - -// Sets default values -ACameraFollowActor::ACameraFollowActor() -{ - // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. - PrimaryActorTick.bCanEverTick = true; - - // Create the camera component - CameraComponent = CreateDefaultSubobject(TEXT("CameraComponent")); - RootComponent = CameraComponent; -} - -// Called when the game starts or when spawned -void ACameraFollowActor::BeginPlay() -{ - Super::BeginPlay(); -} - -// Called every frame -void ACameraFollowActor::Tick(float DeltaTime) -{ - Super::Tick(DeltaTime); - - if (TargetActor) - { - // Update the camera position to follow the target actor with the specified offset - FVector NewLocation = TargetActor->GetActorLocation() + CameraOffset; - SetActorLocation(NewLocation); - } -} \ No newline at end of file diff --git a/Source/MyProject3/CameraFollowActor.h b/Source/MyProject3/CameraFollowActor.h deleted file mode 100644 index a1e168c..0000000 --- a/Source/MyProject3/CameraFollowActor.h +++ /dev/null @@ -1,36 +0,0 @@ -// CameraFollowActor.h -#pragma once - -#include "CoreMinimal.h" -#include "GameFramework/Actor.h" -#include "CameraFollowActor.generated.h" - -UCLASS() -class YOURPROJECT_API ACameraFollowActor : public AActor -{ - GENERATED_BODY() - -public: - // Sets default values for this actor's properties - ACameraFollowActor(); - -protected: - // Called when the game starts or when spawned - virtual void BeginPlay() override; - -public: - // Called every frame - virtual void Tick(float DeltaTime) override; - - // The target actor that the camera will follow - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Camera") - AActor* TargetActor; - - // The offset from the target actor - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Camera") - FVector CameraOffset; - -private: - UPROPERTY(VisibleAnywhere) - UCameraComponent* CameraComponent; -}; \ No newline at end of file diff --git a/Source/MyProject3/MyCharacter.cpp b/Source/MyProject3/MyCharacter.cpp deleted file mode 100644 index 712d2b3..0000000 --- a/Source/MyProject3/MyCharacter.cpp +++ /dev/null @@ -1,99 +0,0 @@ -#include "MyCharacter.h" -#include "GameFramework/SpringArmComponent.h" -#include "Camera/CameraComponent.h" -#include "GameFramework/Controller.h" -#include "GameFramework/CharacterMovementComponent.h" - -AMyCharacter::AMyCharacter() -{ - PrimaryActorTick.bCanEverTick = true; - - // Create a camera boom (pulls in towards the player if there is a collision) - CameraBoom = CreateDefaultSubobject(TEXT("CameraBoom")); - CameraBoom->SetupAttachment(RootComponent); - CameraBoom->TargetArmLength = 300.0f; // The camera follows at this distance behind the character - CameraBoom->bUsePawnControlRotation = true; // Rotate the arm based on the controller - - // Create a follow camera - FollowCamera = CreateDefaultSubobject(TEXT("FollowCamera")); - FollowCamera->SetupAttachment(CameraBoom, USpringArmComponent::SocketName); // Attach the camera to the end of the boom and let the boom adjust to match the controller orientation - FollowCamera->bUsePawnControlRotation = false; // Camera does not rotate relative to arm - - // Set base turn and look up rates - BaseTurnRate = 45.0f; - BaseLookUpRate = 45.0f; - - // Don't rotate when the controller rotates. Let that just affect the camera. - bUseControllerRotationPitch = false; - bUseControllerRotationYaw = false; - bUseControllerRotationRoll = false; - - // Configure character movement - GetCharacterMovement()->bOrientRotationToMovement = true; // Character moves in the direction of input... - GetCharacterMovement()->RotationRate = FRotator(0.0f, 540.0f, 0.0f); // ...at this rotation rate - GetCharacterMovement()->JumpZVelocity = 600.0f; - GetCharacterMovement()->AirControl = 0.2f; -} - -void AMyCharacter::BeginPlay() -{ - Super::BeginPlay(); -} - -void AMyCharacter::Tick(float DeltaTime) -{ - Super::Tick(DeltaTime); -} - -void AMyCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) -{ - Super::SetupPlayerInputComponent(PlayerInputComponent); - - PlayerInputComponent->BindAxis("MoveForward", this, &AMyCharacter::MoveForward); - PlayerInputComponent->BindAxis("MoveRight", this, &AMyCharacter::MoveRight); - - PlayerInputComponent->BindAxis("Turn", this, &APawn::AddControllerYawInput); - PlayerInputComponent->BindAxis("TurnRate", this, &AMyCharacter::TurnAtRate); - PlayerInputComponent->BindAxis("LookUp", this, &APawn::AddControllerPitchInput); - PlayerInputComponent->BindAxis("LookUpRate", this, &AMyCharacter::LookUpAtRate); -} - -void AMyCharacter::MoveForward(float Value) -{ - if ((Controller != nullptr) && (Value != 0.0f)) - { - // find out which way is forward - const FRotator Rotation = Controller->GetControlRotation(); - const FRotator YawRotation(0, Rotation.Yaw, 0); - - // get forward vector - const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::X); - AddMovementInput(Direction, Value); - } -} - -void AMyCharacter::MoveRight(float Value) -{ - if ((Controller != nullptr) && (Value != 0.0f)) - { - // find out which way is right - const FRotator Rotation = Controller->GetControlRotation(); - const FRotator YawRotation(0, Rotation.Yaw, 0); - - // get right vector - const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::Y); - AddMovementInput(Direction, Value); - } -} - -void AMyCharacter::TurnAtRate(float Rate) -{ - // calculate delta for this frame from the rate information - AddControllerYawInput(Rate * BaseTurnRate * GetWorld()->GetDeltaSeconds()); -} - -void AMyCharacter::LookUpAtRate(float Rate) -{ - // calculate delta for this frame from the rate information - AddControllerPitchInput(Rate * BaseLookUpRate * GetWorld()->GetDeltaSeconds()); -} \ No newline at end of file diff --git a/Source/MyProject3/MyCharacter.h b/Source/MyProject3/MyCharacter.h deleted file mode 100644 index 66f43db..0000000 --- a/Source/MyProject3/MyCharacter.h +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once - -#include "CoreMinimal.h" -#include "GameFramework/Character.h" -#include "MyCharacter.generated.h" - -UCLASS() -class YOURPROJECT_API AMyCharacter : public ACharacter -{ - GENERATED_BODY() - -public: - AMyCharacter(); - -protected: - virtual void BeginPlay() override; - -public: - virtual void Tick(float DeltaTime) override; - virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override; - -private: - void MoveForward(float Value); - void MoveRight(float Value); - void TurnAtRate(float Rate); - void LookUpAtRate(float Rate); - - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true")) - class USpringArmComponent* CameraBoom; - - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true")) - class UCameraComponent* FollowCamera; - - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true")) - float BaseTurnRate; - - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true")) - float BaseLookUpRate; -}; \ No newline at end of file diff --git a/Source/MyProject3/MyGameModeBase.cpp b/Source/MyProject3/MyGameModeBase.cpp deleted file mode 100644 index 641da5a..0000000 --- a/Source/MyProject3/MyGameModeBase.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include "MyGameMode.h" -#include "MyCharacter.h" - -AMyGameMode::AMyGameMode() -{ - // Set default pawn class to our character class - DefaultPawnClass = AMyCharacter::StaticClass(); -} \ No newline at end of file diff --git a/Source/MyProject3/MyGameModeBase.h b/Source/MyProject3/MyGameModeBase.h deleted file mode 100644 index 42d0e62..0000000 --- a/Source/MyProject3/MyGameModeBase.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -#include "CoreMinimal.h" -#include "GameFramework/GameModeBase.h" -#include "MyGameMode.generated.h" - -UCLASS() -class YOURPROJECT_API AMyGameMode : public AGameModeBase -{ - GENERATED_BODY() - -public: - AMyGameMode(); -}; \ No newline at end of file