OperatorController
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->
OperatorController
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->TODO: describe this component.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2OperatorController.component — the player's own body in UNBROKEN FRONT. Sits on `Mount_Player` under the scene's `Systems` entity. It owns the three things the player actually is when looking down: the firearm in their hands, the two arms holding it, and the motion those arms run on. It is built onto the LOCAL player's `CameraRig`, which the engine mints per peer and re-mints on a respawn, so this component waits for that rig to exist and rebuilds against the new one when it changes. Nothing here authors a camera, a body or an input stack — the rig already has those, and a second one would break the moment a second player joined. IT POSES, IT DOES NOT DECIDE. Every number it reads comes from `Core.State`: which weapon is equipped, whether the sights are up, how far through a reload the weapon is, and where the recoil pattern has pushed the muzzle. Gunplay owns those facts; this component is how they are seen. That split is why a reload cannot silently change the ammunition — the magazine moving here is a picture of a decision already made there. The weapon and the hands are ONE assembly. The hands hold points ON the weapon (`weapon.gripFire`, `weapon.gripSupport`), the arms are aimed at those points, and everything downstream of the grip moves with the weapon rather than beside it. Movement state is measured, not read from the controller's own telemetry: see `stepBody`.
basisQ(right: ?, up: ?, fingers: ?) → void
Orientation, derived rather than guessed A hand here is authored LYING FLAT: its local +X runs across the knuckles, its local +Y is the back of the hand, and its fingers reach along -Z. It grips by curling toward -Y. So a hand can only hold something if its knuckle line lies ALONG that thing and its curl sweeps around it. Stating that as three axes and asking the engine for the rotation is the difference between a hand that holds a weapon and the floating, wrongly rolled hands this had before: Euler triples guessed by eye were the reason the support hand sat clear of the handguard with nothing connecting it to the arm. A rotation from the three axes the hand needs: right (+X), up (+Y), and the way the fingers point (the entity's -Z).
| arg | type | description |
|---|---|---|
| right | ? | |
| up | ? | |
| fingers | ? |
aimZ(fromPos: ?, toPos: ?) → void
Point a limb's LOCAL +Z at a target. The limb geometry runs along +Z, and an entity faces -Z, so the look is taken from a mirrored origin.
| arg | type | description |
|---|---|---|
| fromPos | ? | |
| toPos | ? |
qMul(a: ?, b: ?) → void
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? |
qSlerp(a: ?, b: ?, t: ?) → void
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? | |
| t | ? |
qAxis(ax: ?, ay: ?, az: ?, ang: ?) → void
| arg | type | description |
|---|---|---|
| ax | ? | |
| ay | ? | |
| az | ? | |
| ang | ? |
setQ(e: ?, q: ?) → void
| arg | type | description |
|---|---|---|
| e | ? | |
| q | ? |
clearRig( ) → void
Building the view model
buildFor(rig: ?) → void
Place the weapon at the hip and put both hands on it. This is the pose every other pose is layered on top of, so it is written once, here.
| arg | type | description |
|---|---|---|
| rig | ? |
findController( ) → void
stepMovement(dt: ?) → void
Movement — the body answers the controls here The character controller is handed the control map by the scene and can read movement itself, and for a while that was the only path it had. It was also a path that had been taken away from it: the weapon slice activated the same map a second time, and an input map serves ONE control set — the second activation gets the deliveries, so the body stopped moving while the weapon kept working. So the body is driven from the one live control set explicitly. Belt and braces: `game.player.input` guarantees there is only ever one activation, and this writes what it publishes straight onto the controller, so movement does not depend on who the engine decided to deliver to.
| arg | type | description |
|---|---|---|
| dt | ? |
spawnPoints( ) → void
Every `PlayerSpawn` in the scene, so a respawn lands somewhere legal. Scanned on demand: a respawn is a rare event and a cache of spawn points that outlives the scene it was read from is worse than the scan.
stepHealth(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
stepBody(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
leanRoom(side: ?) → void
How far the player can lean this way before the assembly would reach solid geometry. One short trace sideways from the head, so a player against a wall gets no lean rather than a camera pushed through it.
| arg | type | description |
|---|---|---|
| side | ? |
stepLean(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
poseReload(st: ?) → void
Pose, per frame The magazine leaving and re-entering the weapon, driven by the reload stage Gunplay reports. Before ROUNDS_IN the weapon is genuinely short of a magazine; the picture and the state agree because both read the same fact.
| arg | type | description |
|---|---|---|
| st | ? |
poseChargingHandle(st: ?) → void
The charging handle, pulled on an empty reload and released.
| arg | type | description |
|---|---|---|
| st | ? |
poseTrigger(dt: ?, st: ?) → void
The trigger finger: on the trigger, and pressing it when the weapon is actually firing. This is the one place the finger and the shot agree.
| arg | type | description |
|---|---|---|
| dt | ? | |
| st | ? |
poseSupportHand(st: ?) → void
The support hand: on the handguard, leaving it to work the magazine, and back. Timed to the same stages the magazine moves on, because they are the same action seen from two places. The rotation is interpolated as a ROTATION — slerped between the grip and the well — rather than as three Euler angles counted toward a target. A hand turning through 38 degrees of pitch is one rotation; expressing it as a linear walk on three numbers is what makes a wrist look like it is being unscrewed.
| arg | type | description |
|---|---|---|
| st | ? |
drive(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
solveArm(arm: ?, handRoot: ?, off: ?, shoulder: ?, swayX: ?, swayY: ?) → void
The arms counter-rotate against the weapon so the sleeves do not read as welded to it, and their aim is re-solved every frame from where the wrist actually is — so an arm follows its hand through a reload, and an arm that answers the weapon still points at the shoulder.
| arg | type | description |
|---|---|---|
| arm | ? | |
| handRoot | ? | |
| off | ? | |
| shoulder | ? | |
| swayX | ? | |
| swayY | ? |
awake( ) → void
Lifecycle
update(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
editorUpdate(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
onDestroy( ) → void
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.