Skip to content

five-on-it / apps/client/src/renderer/models / weaponFrame

Function: weaponFrame() ​

weaponFrame(weapon, right, left, elbow, up, facing, out): Matrix

Defined in: apps/client/src/renderer/models.ts:134

Where a weapon is held, as a matrix into out (the weapon's frame: its grip at the origin, its barrel along +z, +y up): its grip GRIP_BACK back from the right fist's tip right; a two-handed one's barrel toward the left fist's tip left when the fists hold it by its two ends (the left one well ahead of the right), else the way the torso faces (facing: both fists at the chest, or a launcher's beside each other, the gun level and ahead); a one-handed one's along the right forearm (from the elbow elbow); upright as up (the torso's up) says.

Parameters ​

weapon ​

string

Vector3

left ​

Vector3

elbow ​

Vector3

up ​

Vector3

facing ​

Vector3

out ​

Matrix

Returns ​

Matrix