- New C++ AGigLineNPCPerson: reusable NPC/pedestrian prefab built on the MPFB human. ACharacter capsule half-height 83 cm (total 1.66 m, head top ~1.66 m so a 1.60 m camera doesn't clip), the character skeletal mesh on the built-in mesh as the visible body (feet on Z 0), AutoPossessAI for 0.5.0 pedestrians. Staged at Z 0 in the review scene; captured as review-npc-prefab.png. - AGigLineShotActor now names screenshots by stable camera name (no list-index prefix): inserting or reordering cameras no longer renumbers files or orphans the old ones. Re-rendered all review/demo shots with stable names. - ue_build_review_map.py: chmod the target .umap before save_map (git marks maps 444 on checkout, silently making save_map return False and dropping stages). - Screenshots/README.md, ROADMAP, TODO updated for the prefab + stable names. - DemoMap.umap rebuilt by the render pipeline (north buildings + demo cameras).
34 lines
1.3 KiB
C++
34 lines
1.3 KiB
C++
#include "GigLineNPCPerson.h"
|
|
|
|
#include "Components/CapsuleComponent.h"
|
|
#include "Components/SkeletalMeshComponent.h"
|
|
#include "Engine/SkeletalMesh.h"
|
|
|
|
AGigLineNPCPerson::AGigLineNPCPerson()
|
|
{
|
|
// The MPFB human is ~1.66 m tall, ~0.43 m wide. Half-height 83 cm leaves
|
|
// the head top at ~1.66 m, so a 1.60 m camera does not clip it. Radius
|
|
// ~35 cm accommodates the relaxed idle pose (arms at the sides).
|
|
GetCapsuleComponent()->InitCapsuleSize(35.0f, 83.0f);
|
|
GetCapsuleComponent()->SetRelativeLocation(FVector(0.0f, 0.0f, 83.0f));
|
|
|
|
// Visible body: the imported MPFB human on ACharacter's built-in mesh
|
|
// component, feet at Z 0 (capsule base lowered to the floor).
|
|
USkeletalMeshComponent* Mesh = GetMesh();
|
|
Mesh->SetRelativeLocation(FVector(0.0f, 0.0f, -83.0f));
|
|
Mesh->SetRelativeRotation(FRotator(0.0f, -90.0f, 0.0f));
|
|
Mesh->SetCastShadow(true);
|
|
|
|
static ConstructorHelpers::FObjectFinder<USkeletalMesh> MeshAsset(
|
|
TEXT("/Game/Test/Character/character"));
|
|
if (MeshAsset.Succeeded())
|
|
{
|
|
Mesh->SetSkeletalMeshAsset(MeshAsset.Object);
|
|
Mesh->SetSkeletalMesh(MeshAsset.Object);
|
|
}
|
|
|
|
// An NPC pawn has no player input; hand it to AI when it is spawned into
|
|
// the world (the 0.5.0 pedestrian navigation will drive it).
|
|
AutoPossessAI = EAutoPossessAI::PlacedInWorldOrSpawned;
|
|
bUseControllerRotationYaw = false;
|
|
} |