VNyan pendulum chains
vnyan_pendulumManage VNyan pendulum chains: create, delete, list, set position/rotation. Resolve output-target conflicts to prevent overlapping writers, and control spring parameters for realistic motion.
Instructions
'list' (disk, always readable) reads the pendulum chains configured in VNyan's UI (settings.json 'Chains') and reports every output target written more than once in 'sharedOutputTargets'. 'create'/'delete'/'setPosition'/'setRotation'/'chains' (plugin, live) manage a SEPARATE set of chains created at runtime via this API, addressed by the numeric handle 'create' returns - they are not the same chains as 'list' and don't persist across a VNyan restart. CRITICAL CONSTRAINT: only ONE pendulum may write a given output target directly. VNyan assigns rather than accumulates on all three output paths, so a second writer overwrites the first every frame and the motion cancels out - a routing problem no damping/elasticity tuning will fix. The granularity differs per kind: blendshapes key on NAME (and a name counts as written whether it appears as an output's 'blendshape' or its 'negative'); GameObjects key on (name, transform axis), so the same object on DIFFERENT axes does NOT clash; parameters key on name, so two outputs must never share a 'param'. To layer several pendulums on one target: clear the direct output field on each, give each output its own unique 'param', sum those in a node graph, and apply the total with a single node - ObjectRotNode for transforms (set all three axes together, it zeroes omitted ones), or for a SIGNED blendshape pair a FilterParamNode sign split into two BlendshapeNodes, since one BlendshapeNode cannot drive two different shapes. Read vnyan_guide topic:'pendulum-composition' for the verified recipe and the full field-by-field data model BEFORE changing a chain's outputs. See vnyan_guide topic:'pendulum-tuning' for the spring params.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inert | No | How rigidly the chain FOLLOWS the avatar's own movement, 0-1 (hard-clamped). Default 0. Reads backwards from the name, so mind the direction: DynamicBone integrates 'position += velocity*(1-damping) + gravity + objectMove*inert', i.e. the object's motion is ADDED to each particle in proportion to inert. 1 = the chain travels with the avatar, so moving or turning it induces NO swing; 0 = the chain ignores the avatar, so avatar motion produces MAXIMUM swing. Raise it when head movement shakes a chain that should only react to its own input value. For 'create', at runtime creation time only. | |
| value | No | Drive value for setPosition/setRotation - setPosition makes the pendulum swing back and forth as this value changes over repeated calls; setRotation swings it to this angle and holds it there. | |
| action | Yes | Which pendulum operation to perform | |
| handle | No | Handle from a prior 'create' (required for all but 'create') | |
| damping | No | How fast motion decays, 0-1 (hard-clamped by VNyan). Default 0.1. Higher = settles sooner. For 'create', at runtime creation time only. | |
| boneCount | No | For 'create'. Typical chains use 2-4 bones. Default 4 | |
| stiffness | No | Resistance to being rotated away from the rest orientation, 0-1 (hard-clamped). Default 0.1. For 'create', at runtime creation time only. | |
| elasticity | No | Restoring force pulling each bone back to its rest position, 0-1 (hard-clamped). Default 0.1. LOWER = floppier / more swing-bounce; higher = snaps back fast - it's a return-strength, not a bounce-amount, so low values look bouncier. Applies uniformly across the whole chain (VNyan does not use per-bone distribution curves), though motion naturally accumulates toward the chain tip. For 'create', at runtime creation time only. |