Smoke: the camera keeps a transform written between frames; CameraChecks: the pole is crossed in small steps
Pins that the camera writes on input only (a per-frame placement mutant survived without it) and that no clamp stops the orbit near the pole (a clamp mutant survived a single large motion). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9c9fa8db15
commit
21ed762d35
2 changed files with 12 additions and 2 deletions
|
|
@ -78,8 +78,10 @@ public static class CameraChecks
|
|||
Check(Near(camera.Transform, orbited, 1e-5f), $"Alt+left-drag gave {camera.Transform}, not the middle-drag's {orbited}");
|
||||
Back();
|
||||
|
||||
// Over the top: a drag down of 400 px pitches 160 degrees, past the pole, and the view turns upside down rather than stopping.
|
||||
Drag(MouseButton.Middle, new Vector2(0, 400));
|
||||
// Over the top: a drag down of 400 px in 40 motions pitches 160 degrees, past the pole, and the view turns upside down rather than stopping.
|
||||
Button(MouseButton.Middle, true);
|
||||
for (int i = 0; i < 40; i++) Motion(new Vector2(0, 10), MouseButtonMask.Middle); // many small steps: a clamp near the pole would stop here
|
||||
Button(MouseButton.Middle, false);
|
||||
Check(camera.Basis.Y.Dot(Vector3.Up) < 0, "an orbit of 160 degrees over the top did not carry the view over");
|
||||
// Upside down, a drag to the right still turns the scene with the cursor: the yaw reverses (Blender's turntable does).
|
||||
var flipped = camera.Transform;
|
||||
|
|
|
|||
|
|
@ -77,6 +77,14 @@ public partial class Smoke : Node
|
|||
for (ulong seed = 1; seed <= 3; seed++) { PressReset(seed); await Frame(); }
|
||||
Check(_main.Bodies.PuppetMeshBuilds == 1, $"the puppet mesh was built {_main.Bodies.PuppetMeshBuilds} times by the third Reset; the signature never changed, so once");
|
||||
CameraChecks.Run(failure => Check(false, "camera: " + failure), _main);
|
||||
// The camera writes its transform on input only: one written between frames stays through them.
|
||||
var orbit = _main.GetNode<OrbitCamera>("Camera");
|
||||
var home = orbit.Transform;
|
||||
var moved = new Transform3D(home.Basis.Rotated(Vector3.Up, 1f), home.Origin + new Vector3(0.1f, 0, 0));
|
||||
orbit.Transform = moved;
|
||||
for (int i = 0; i < 3; i++) await ToSignal(GetTree(), SceneTree.SignalName.ProcessFrame);
|
||||
Check(orbit.Transform == moved, $"the camera moved itself from {moved.Origin} to {orbit.Transform.Origin} between frames");
|
||||
orbit.Transform = home;
|
||||
if (_failures.Count > 0) return;
|
||||
|
||||
// Seed 1 at the default intensity against the headless run: events, and the hand at ticks 240 and 1500.
|
||||
|
|
|
|||
Loading…
Reference in a new issue