New Character Blueprint based on cpp Character

Fixed cooking issue caused by uninitialized value in
SSTCharacterMovementComponent in BP_MainCharacter_orig
This commit is contained in:
charnet3d 2024-01-25 06:43:56 +01:00
parent 8decf0b9c9
commit 6eb6f9c203
9 changed files with 44 additions and 21 deletions

View File

@ -2,7 +2,7 @@
EditorStartupMap=/Game/SideScroller/Maps/ExampleMap.ExampleMap EditorStartupMap=/Game/SideScroller/Maps/ExampleMap.ExampleMap
LocalMapOptions= LocalMapOptions=
TransitionMap=None TransitionMap=None
bUseSplitscreen=True bUseSplitscreen=False
TwoPlayerSplitscreenLayout=Horizontal TwoPlayerSplitscreenLayout=Horizontal
ThreePlayerSplitscreenLayout=FavorTop ThreePlayerSplitscreenLayout=FavorTop
FourPlayerSplitscreenLayout=Grid FourPlayerSplitscreenLayout=Grid
@ -63,7 +63,7 @@ r.AllowStaticLighting=True
r.NormalMapsForStaticLighting=False r.NormalMapsForStaticLighting=False
r.ForwardShading=False r.ForwardShading=False
r.VertexFoggingForOpaque=True r.VertexFoggingForOpaque=True
r.SeparateTranslucency=True r.SeparateTranslucency=False
r.TranslucentSortPolicy=0 r.TranslucentSortPolicy=0
TranslucentSortAxis=(X=0.000000,Y=-1.000000,Z=0.000000) TranslucentSortAxis=(X=0.000000,Y=-1.000000,Z=0.000000)
xr.VRS.FoveationLevel=0 xr.VRS.FoveationLevel=0
@ -71,8 +71,8 @@ xr.VRS.DynamicFoveation=False
r.CustomDepth=1 r.CustomDepth=1
r.CustomDepthTemporalAAJitter=True r.CustomDepthTemporalAAJitter=True
r.PostProcessing.PropagateAlpha=0 r.PostProcessing.PropagateAlpha=0
r.DefaultFeature.Bloom=True r.DefaultFeature.Bloom=False
r.DefaultFeature.AmbientOcclusion=True r.DefaultFeature.AmbientOcclusion=False
r.DefaultFeature.AmbientOcclusionStaticFraction=True r.DefaultFeature.AmbientOcclusionStaticFraction=True
r.DefaultFeature.AutoExposure=False r.DefaultFeature.AutoExposure=False
r.DefaultFeature.AutoExposure.Method=0 r.DefaultFeature.AutoExposure.Method=0
@ -190,8 +190,8 @@ AutoStreamingThreshold=0.000000
SoundCueCookQualityIndex=-1 SoundCueCookQualityIndex=-1
[/Script/HardwareTargeting.HardwareTargetingSettings] [/Script/HardwareTargeting.HardwareTargetingSettings]
TargetedHardwareClass=Desktop TargetedHardwareClass=Mobile
AppliedTargetedHardwareClass=Desktop AppliedTargetedHardwareClass=Mobile
DefaultGraphicsPerformance=Scalable DefaultGraphicsPerformance=Scalable
AppliedDefaultGraphicsPerformance=Scalable AppliedDefaultGraphicsPerformance=Scalable
@ -215,3 +215,12 @@ ConnectionType=USBOnly
bUseManualIPAddress=False bUseManualIPAddress=False
ManualIPAddress= ManualIPAddress=
[/Script/Slate.SlateSettings]
bExplicitCanvasChildZOrder=True
[/Script/AndroidRuntimeSettings.AndroidRuntimeSettings]
PackageName=com.mysticvector.funnyprince
VersionDisplayName=0.1
InstallLocation=InternalOnly
bPackageDataInsideApk=True

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -26,5 +26,10 @@
"Enabled": true, "Enabled": true,
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/92a8824c461141ce95f77e454d0c1ba5" "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/92a8824c461141ce95f77e454d0c1ba5"
} }
],
"TargetPlatforms": [
"Android",
"Linux",
"Windows"
] ]
} }

View File

@ -4,7 +4,7 @@
#include "FunnyPrinceCharacter.h" #include "FunnyPrinceCharacter.h"
#include "SSTCharacterMovementComponent.h" #include "SSTCharacterMovementComponent.h"
DEFINE_LOG_CATEGORY(LogTemplateCharacter); DEFINE_LOG_CATEGORY(LogTemplateFunnyPrinceCharacter);
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
@ -30,3 +30,15 @@ void AFunnyPrinceCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInp
{ {
Super::SetupPlayerInputComponent(PlayerInputComponent); Super::SetupPlayerInputComponent(PlayerInputComponent);
} }
bool AFunnyPrinceCharacter::CanJumpInternal_Implementation() const
{
USSTCharacterMovementComponent* Movement = Cast<USSTCharacterMovementComponent>(GetCharacterMovement());
if (Movement)
{
return Super::CanJumpInternal_Implementation() || Movement->CanWalljump();
}
return Super::CanJumpInternal_Implementation();
}

View File

@ -7,7 +7,7 @@
#include "Logging/LogMacros.h" #include "Logging/LogMacros.h"
#include "FunnyPrinceCharacter.generated.h" #include "FunnyPrinceCharacter.generated.h"
DECLARE_LOG_CATEGORY_EXTERN(LogTemplateCharacter, Log, All); DECLARE_LOG_CATEGORY_EXTERN(LogTemplateFunnyPrinceCharacter, Log, All);
/** /**
* *
@ -27,6 +27,8 @@ protected:
// To add mapping context // To add mapping context
virtual void BeginPlay(); virtual void BeginPlay();
virtual bool CanJumpInternal_Implementation() const override;
private: private:
public: public:

View File

@ -5,10 +5,5 @@
AFunnyPrinceGameMode::AFunnyPrinceGameMode() AFunnyPrinceGameMode::AFunnyPrinceGameMode()
{ {
// set default pawn class to our Blueprinted character
static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(TEXT("/Game/SideScroller/Blueprints/BP_MainCharacter"));
if (PlayerPawnBPClass.Class != NULL)
{
DefaultPawnClass = PlayerPawnBPClass.Class;
}
} }