Skip to Content

Standoff

Two gunmen face each other across a saloon: one takes a handgun off the bar, brings it to high ready, takes aim and fires one shot; the other takes his own off the far bar, holds at high ready, lays it down and surrenders.

The packages refuse this scene today, in their own words on the view below. #3528 fixes it.

Computing the take.

Each person is a chain of typed actions from @automovie/motions. This is what an agent writes for the scene; Composing motion explains the parts.

import type { IAutoMovieMotionHumanBody, IAutoMovieMotionHumanPerformance } from "@automovie/interface";
import { HumanChain, HumanFirearm, HumanObject, HumanPerformance, HumanWeaponFirearm } from "@automovie/motions";
import * as archetypes from "@automovie/archetypes";

const bar = archetypes.createTable({ kind: "counter" });
const barAt = { at: { x: 0, y: 0, z: 0.53 }, yaw: 180 };
const pistol = archetypes.createHandgun({ frame: "fullSize" });
const pistolAt = { at: { x: -0.18, y: 0.914, z: 0.3 }, yaw: 0 };
const farBar = archetypes.createTable({ kind: "counter" });
const farBarAt = { at: { x: 0, y: 0, z: 5.47 }, yaw: 0 };
const pistolB = archetypes.createHandgun({ frame: "fullSize" });
const pistolBAt = { at: { x: 0.18, y: 0.914, z: 5.7 }, yaw: 180 };

// gun: body m1, at (0, 0) m, facing 0°, trained
const gun = HumanChain.subject("gun")
  .registered("drawFirearm", { prop: "pistol" })
  .registered("presentFirearm", {
      gun: "pistol",
      carriage: "highReady",
      target: { kind: "person", subject: "ace", region: "sternum" },
    })
  .registered("takeAim", {
      gun: "pistol",
      target: { kind: "person", subject: "ace", region: "sternum" },
    })
  .registered("recoil", { gun: "pistol" });

// ace: body m2, at (0, 6) m, facing 180°, trained
const ace = HumanChain.subject("ace")
  .registered("drawFirearm", { prop: "pistolB" })
  .registered("highReady", { gun: "pistolB", seconds: 1.5 })
  .registered("holsterFirearm", { prop: "pistolB", at: { x: 0.18, y: 0.914, z: 5.7 } })
  .registered("surrender", {});

const scene = gun.with(ace);

// The lexicon's laws this scene's rows perform, registered with the performance.
const laws = [HumanWeaponFirearm.draw, HumanWeaponFirearm.present, HumanFirearm.takeAim, HumanFirearm.recoil, HumanFirearm.highReady, HumanWeaponFirearm.holster, HumanFirearm.surrender];

const props = [
  HumanObject.prop("bar", bar, barAt),
  HumanObject.prop("pistol", pistol, pistolAt),
  HumanObject.prop("farBar", farBar, farBarAt),
  HumanObject.prop("pistolB", pistolB, pistolBAt),
];

// Each body id's motion body, prepared from the site's measures.
declare const bodies: Record<string, IAutoMovieMotionHumanBody>;

const input: IAutoMovieMotionHumanPerformance.IInput = {
  seed: "standoff",
  performers: [
    { subject: "gun", body: bodies["m1"]!, at: { x: 0, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
    { subject: "ace", body: bodies["m2"]!, at: { x: 0, y: 0, z: 6 }, yaw: 180, proficiency: { level: "trained" } },
  ],
  composition: scene.node,
  props,
  laws,
};
const performance = new HumanPerformance(input);