Adds demo-vehicle to the camera list and the visual targets, plus shot 9 in Screenshots/README.md - marked FAIL, because that is what it shows. The vehicle is staged and runs: spawned at (-12950,-900,120), 9 visual panels attached, panel 0 visible with a 238 cm extent, settled at Z 119 cm. The capture shows an empty road with a soft shadow. Two checks disagree in a useful way: visual_loop --verify PASSES the frame (it only tests size, blankness and tonal range, so a well-exposed empty road passes), while judge_screenshot returns verdict=no confidence=1.0. Strongest clue, recorded in TODO.md: a downward trace from the vehicle finds no ground at all (ground at Z -9999), so the car sits over a surface without collision or inside geometry - the shadow and the panels are not in the same place. Diagnostics added along the way: mesh/visibility/bounds at BeginPlay, per-panel world positions and extents, and the ground trace. The visual panels were also unhidden from the physics mesh: SetVisibility(false, ...) hid them whether or not propagation was requested.
61 lines
1.9 KiB
C++
61 lines
1.9 KiB
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "WheeledVehiclePawn.h"
|
|
#include "GigLineVehicle.generated.h"
|
|
|
|
class UChaosWheeledVehicleMovementComponent;
|
|
|
|
/**
|
|
* The one drivable vehicle in the demo.
|
|
*
|
|
* A skeletal mesh with a root bone and four wheel bones, driven by Chaos. Every
|
|
* dimension it configures — wheel radius, wheelbase, track — comes from the Blender
|
|
* build's report rather than being typed twice: the numbers are repeated here as
|
|
* constants with the report path in the comment so a change to the model shows up as a
|
|
* mismatch instead of a silent drift.
|
|
*
|
|
* Model: `Art/blender/vehicle/gigline-sedan.blend`, report `Art/blender/vehicle/report.json`
|
|
* (4.72 x 1.80 x 1.44 m, wheelbase 2.78 m, track 1.62 m, wheel radius 0.33 m).
|
|
*/
|
|
UCLASS()
|
|
class GIGLINE_API AGigLineVehicle : public AWheeledVehiclePawn
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
AGigLineVehicle();
|
|
|
|
virtual void BeginPlay() override;
|
|
virtual void Tick(float DeltaSeconds) override;
|
|
|
|
/**
|
|
* Visual panels, as static mesh components.
|
|
*
|
|
* The skeletal vehicle asset imported with no usable geometry (runtime bounds of
|
|
* 1 cm), so the car was invisible in the scene while its physics body still cast a
|
|
* shadow - the "no vehicle in scene" report. The static assets are correct (body
|
|
* 476 x 176 x 128 cm), so the visible car is assembled from them and the skeletal
|
|
* mesh stays as the physics/animation driver only.
|
|
*/
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Visual")
|
|
TArray<TObjectPtr<UStaticMeshComponent>> Panels;
|
|
|
|
/** True once the vehicle reports a forward speed above a walking pace. */
|
|
bool IsMoving() const;
|
|
|
|
private:
|
|
/** Configure the Chaos wheels from the modelled dimensions. */
|
|
void ConfigureWheels();
|
|
|
|
/** Attach the visible panels from the imported static systems. */
|
|
void BuildVisuals();
|
|
|
|
float DriveElapsed = 0.f;
|
|
bool bDriveReported = false;
|
|
FVector DriveStart = FVector::ZeroVector;
|
|
|
|
float SettleElapsed = 0.f;
|
|
bool bSettleReported = false;
|
|
};
|