Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld 07a07267-3…

viewmodel

<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->

by◐lolboy21·posted 1mo ago
What it does

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/v2

game.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.

Model

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

argtypedescription
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.

argtypedescription
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.

argtypedescription
parent?
cfg?

mid(a: ?, b: ?) → void

argtypedescription
a?
b?

span(a: ?, b: ?) → void

argtypedescription
a?
b?

tube(prefix: ?, y: ?, outer: ?, wall: ?, length: ?, z: ?) → void

Four walls around an open bore, plus the glass at each end.

argtypedescription
prefix?
y?
outer?
wall?
length?
z?

buildHand(parent: ?, side: ?, mats: ?) → void

argtypedescription
parent?
side?
mats?

L(v: ?) → void

argtypedescription
v?

setChainCurl(joints: ?, amount: ?) → void

Curl a chain: 0 is straight, 1 is a closed fist.

argtypedescription
joints?
amount?

setCurl(hand: ?, amount: ?) → void

Curl every joint this hand owns by the same amount.

argtypedescription
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.

argtypedescription
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.

argtypedescription
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.

47items
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
backing path · game/art/viewmodel.module

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ 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".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.