更新船体模型和配置文件说明

This commit is contained in:
997146918 2025-07-28 09:54:59 +08:00
parent cdbb00be26
commit ec20d16846
8 changed files with 14 additions and 10 deletions

Binary file not shown.

Binary file not shown.

View File

@ -214,14 +214,17 @@ struct FShipDataConfig
{ {
GENERATED_BODY() GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ship", meta = (ForceUnits = "cm", ToolTip = "船体长度")) // UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ship", meta = (ForceUnits = "cm", ToolTip = "船体长度"))
int32 ShipLength = 100; // int32 ShipLength = 100;
//
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ship", meta = (ForceUnits = "cm", ToolTip = "船体宽度")) // UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ship", meta = (ForceUnits = "cm", ToolTip = "船体宽度"))
int32 ShipWidth = 100; // int32 ShipWidth = 100;
//
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ship", meta = (ForceUnits = "cm", ToolTip = "船体高度")) // UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ship", meta = (ForceUnits = "cm", ToolTip = "船体高度"))
int32 ShipHeight = 100; // int32 ShipHeight = 100;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ship", meta = (FToolTip = "船体缩放"))
FVector ShipScale = FVector::One();
/*** Movement ***/ /*** Movement ***/
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ForceUnits = "cm/s", Category = "Character|Movement", ToolTip = "正常速度")) UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ForceUnits = "cm/s", Category = "Character|Movement", ToolTip = "正常速度"))
float BaseSpeed = 600.f; float BaseSpeed = 600.f;

View File

@ -175,8 +175,9 @@ void AShipbase::StopSprintMove()
void AShipbase::ApplyShipSize() void AShipbase::ApplyShipSize()
{ {
GetCapsuleComponent()->SetCapsuleSize(FMath::Min(ShipData.ShipHeight/2.f, 100.f), ShipData.ShipHeight/2.f); // GetCapsuleComponent()->SetCapsuleSize(FMath::Min(ShipData.ShipHeight/2.f, 100.f), ShipData.ShipHeight/2.f);
ShipMesh->SetWorldScale3D(FVector(ShipData.ShipLength/100.f, ShipData.ShipWidth/100.f, ShipData.ShipHeight/100.f)); // ShipMesh->SetWorldScale3D(FVector(ShipData.ShipLength/100.f, ShipData.ShipWidth/100.f, ShipData.ShipHeight/100.f));
ShipMesh->SetWorldScale3D(ShipData.ShipScale);
} }
void AShipbase::ApplyMovementSettings() void AShipbase::ApplyMovementSettings()