Vixen
02b45cc4
csharp
public record class ScreenFrame

A place in the picture, resolved to where the camera would have to be to put it there.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

⚠ An IConstraintFrame that answers a question about the camera rather than about the subject, and that inversion is the whole trick. Every other frame says "the goal is here". This one says "for the subject to be there in the picture, the camera would have to be here" — which turns a framing constraint into an ordinary position goal on a rigid body, and lets it average, weight, prioritise and arbitrate with the world volume that bounds where the camera may go.

It slides rather than dollies. The camera is placed at the subject's current depth, so a goal that wants a head in the upper third moves the camera sideways and up, not backwards. A shot that should also change its distance says so with a second goal.

Two cases an authored shot cannot cover. Framing survives body variation — a shot composed against one character puts a taller one's head out of frame, and holding the composition rather than the transform is what keeps the picture. And the camera keeps out of the geometry, because a region goal in world space bounds where it may go.

Fields and properties (3)

  • public IConstraintFrame Subject

    Where the thing being framed is — a joint, or a coordinate on a shape.

  • public Vector2 Screen

    Where it should land, in normalised device coordinates: (0, 0) the centre, ±1 the edges.

  • public Vector2 Region

    How far off that it may be and still count — a dead zone, in the same units.

Methods (3)

Used by (1)

  • PlacementTestsVixen.Animation.Tests