test(camera): -cameratest harness for the spring-arm collision, result inconclusive

0.2.3 is about camera clipping, and nothing had ever exercised the spring arm's
collision test. This adds a harness: find the nearest wall from the spawn, stand the pawn
70 cm off it facing away, wait for the boom, then report the arm length, whether the boom
ends inside geometry, and a back-trace from camera to head.

Inconclusive, and the setup is the suspect rather than the engine: every run reports the
arm at its resting 340 cm, but BOTH traces come back clear, so nothing was between the
pawn and the boom at all. The placement is wrong, not necessarily the collision.

Three wrong turns recorded in TODO.md because each cost a run: the probe accepted the
floor as a wall, then faced the pawn into the wall by negating the impact normal (which
points away from it), then set actor rotation only - which a possessed pawn discards in
favour of control rotation.

Next: look at the placement screenshot before trusting the measurement.
This commit is contained in:
zwitschi committed 2026-11-09 14:33:57 +01:00
1 parent d8b44f1e57
commit a6701aa3d1
3 files changed
+140 -2

No files matched your search

@@ -200,6 +200,18 @@ protected:
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Input")
TObjectPtr<UInputAction> ToggleDebugAction;
/** Current boom length and camera position of the third-person rig. */
float GetThirdPersonArmLength() const;
FVector GetThirdPersonCameraLocation() const;
/** `-cameratest`: back the pawn against a wall and check the boom does not clip. */
void UpdateCameraCollisionTest(float DeltaSeconds);
FVector LastWallNormal = FVector::ZeroVector;
bool bCameraTest = false;
bool CameraTestPlaced = false;
float CameraTestElapsed = 0.0f;
/** Flips the gigline.Debug console variable that the HUD reads. */
void ToggleDebugOverlay();