viewmodel
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
viewmodel
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->TODO: describe this module.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2game.art.viewmodel — UNBROKEN FRONT's first-person view model. This is the thing the player looks at for the whole game, so it is built the only way that survives being looked at closely: from named parts, in a hierarchy, so animation can drive them. Three roots hang off the player's camera rig: weaponRoot the firearm. Every mechanism that moves is its own entity — magazine, charging handle, bolt, trigger — so a reload moves the magazine instead of hiding a counter. rightRoot the firing hand: forearm, glove, palm, and four fingers of three joints each plus a two-joint thumb. leftRoot the support hand, built the same way. Each finger joint is a real entity with a rest rotation, so curling a finger is `setCurl` rather than a swapped mesh. That is what makes the trigger finger able to sit outside the guard, move onto the trigger, and press it, and it is why nothing here is a single rigid glove. Units are metres, in the weapon root's own space: -Z is down the barrel, +Y is up, +X is the shooter's right.
mats( ) → void
Every material the view model draws with, resolved fresh on each build. Not memoised: re-authoring a material mints a new guid, so a cached reference becomes a handle to an asset that no longer exists.
part(parent: ?, name: ?, pos: ?, size: ?, material: ?, rot: ?, mesh: ?) → void
A box, and the parts the animations move
| arg | type | description |
|---|---|---|
| parent | ? | |
| name | ? | |
| pos | ? | |
| size | ? | |
| material | ? | |
| rot | ? | |
| mesh | ? |
segPart(parent: ?, name: ?, pos: ?, diameter: ?, length: ?, material: ?, mesh: ?, rot: ?) → void
A round segment: a capsule, cylinder or cone running along the entity's own Z, the same axis a cube's `size.z` uses. Every limb in this model was a cube, and a finger or a forearm made of boxes can only ever read as a slab however it is posed. The engine ships capsule, cylinder and rounded_box meshes; these are them. The animation node and the mesh are TWO entities, deliberately. The node carries the chain rotation and is what `setFingerCurl` drives; the mesh child carries the 90-degree correction that turns a Y-length primitive into a Z-length one. Folding the two together would make every curl rotate the mesh out of line.
| arg | type | description |
|---|---|---|
| parent | ? | |
| name | ? | |
| pos | ? | |
| diameter | ? | |
| length | ? | |
| material | ? | |
| mesh | ? | |
| rot | ? |
buildWeapon(parent: ?, cfg: ?) → void
The firearm `cfg` is a Core.Weapons entry. The proportions come from its `model` record, so a carbine is short where a precision rifle is long, and the optic is a different object rather than the same box tinted.
| arg | type | description |
|---|---|---|
| parent | ? | |
| cfg | ? |
mid(a: ?, b: ?) → void
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? |
span(a: ?, b: ?) → void
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? |
tube(prefix: ?, y: ?, outer: ?, wall: ?, length: ?, z: ?) → void
Four walls around an open bore, plus the glass at each end.
| arg | type | description |
|---|---|---|
| prefix | ? | |
| y | ? | |
| outer | ? | |
| wall | ? | |
| length | ? | |
| z | ? |
buildHand(parent: ?, side: ?, mats: ?) → void
| arg | type | description |
|---|---|---|
| parent | ? | |
| side | ? | |
| mats | ? |
L(v: ?) → void
| arg | type | description |
|---|---|---|
| v | ? |
setChainCurl(joints: ?, amount: ?) → void
Curl a chain: 0 is straight, 1 is a closed fist.
| arg | type | description |
|---|---|---|
| joints | ? | |
| amount | ? |
setCurl(hand: ?, amount: ?) → void
Curl every joint this hand owns by the same amount.
| arg | type | description |
|---|---|---|
| hand | ? | |
| amount | ? |
setFingerCurl(hand: ?, fingerIndex: ?, amount: ?) → void
Curl one finger, leaving the others alone. The trigger finger has to be able to act independently of the three wrapped round a grip.
| arg | type | description |
|---|---|---|
| hand | ? | |
| fingerIndex | ? | |
| amount | ? |
buildArm(parent: ?, side: ?, mats: ?, handRoot: ?) → void
Forearms Bare skin from the wrist to a sleeve rolled up above the elbow. This is what the reference shows, and it is also the honest shape: a glove ending at the wrist and a sleeve starting at the elbow means the arm has a wrist, a taper and a bend rather than being one tube. The forearm is thicker at the elbow than at the wrist — 8.2 cm against 5.8 cm — because that is what a forearm measures, and the taper is most of what makes an arm read as an arm.
| arg | type | description |
|---|---|---|
| parent | ? | |
| side | ? | |
| mats | ? | |
| handRoot | ? |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
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.