Skip to content

Action Nodes

lunazera edited this page Apr 10, 2024 · 32 revisions

Types of Action Nodes:

Action Triggers

These are all nodes that will perform actions when they are triggered

Throw Item

ThrowItemNode

Throw item at avatar

  • Items - List of items. Loaded from items\throwables
  • Amount of throw - Amount of items to throw. Number or [parameter]
  • Destroy after seconds - Seconds after which item will be removed. Number or [parameter]
  • Flinch Power - Amount of head flinch to apply on hit. 0 = none, 1 = max
  • Time between throws - Cooldown to stagger multiple throws, in milliseconds. Number or [parameter]
  • Volume - Volume multiplier applied to all audio sources in thrown items
  • Item Tag - Item tag for Collision-node's filtering. Empty = not in use
  • Scale - Scale multiplier to apply to the items
  • Throw Direction - Specify direction where items are thrown from
  • Throw Target - Throw target avatar bone
  • Throw Height - Height added to throw target
  • Force - Force applied to throwable
  • Sticky Override - Applies/overrides sticky property onto your item
  • Stick for milliseconds - How long the sticky property applies for. Number or [parameter]

Bubble

Fires 2D images from camera towards Avatar. Bubbles can be added by placing .png images inside vnyan/Items/Bubbles.

  • Items - Images that can be thrown
  • Amount to throw - Amount of bubbles to throw at avatar. Number or [parameter]
  • Flinch Power - How much flinch to apply to avatar on collision
  • Item Tag - Used with Collision-node to filter item collisions by tag
  • Scale - Size multiplier
  • Bubble Speed - Speed at which bubbles move
  • Pop Particle - Play pop particle and effect on destruction of bubble
  • Is Sticky - Stick the bubble on the avatar instead of destroying it right away
  • Sticky Destroy Time - If sticky, milliseconds to wait after sticking before destroying. Number or [parameter]
  • Direction - Direction where to shoo the bubbles from relative to camera

Food

Spawns food item in either avatar's hand or floating around the head. Food items are loaded from the items\edibles folder.

You can adjust the placement of the food item on the right or left hand of your avatar with the sliders provided in the Colliders etc menu.

  • Position - Position where to spawn food (can be floating, or in left or right hand)
  • Items - List of items. Loaded from items\edibles
  • Item Tag - Item tag for Collision-node's filtering. Empty = not in use
  • Scale - Sive of food item.

Drop Item

Drop item on avatar

  • Item - List of items. Loaded from items\droppables
  • Destroy after seconds - Seconds after which item will be removed. Number or [parameter]
  • Amount - Amount of items to drop. Number or [parameter]
  • Random Spawn - Randomize spawning instead of directly dropping on avatar
  • Volume - Volume multiplier applied to all audio sources in thrown items
  • Override Mass - Override mass specified in droppable's rigidbody. Number or [parameter]
  • Override Drag - Override drag specified in droppable's rigidbody. Number or [parameter]
  • Item Tag - Item tag for Collision-node's filtering. Empty = not in use
  • Scale - Scale multiplier to apply to the items

Confetti

Blasts a confetti effect at your avatar.

For custom confetti, it's recommended to use custom Throwable Items instead.

Bonk

Bonks avatar with baseball bat.

For a custom bonk effect, you could use the Props system instead.

Headpat

Does a simple headpat animation

For a custom headpat effect, you could use the Props system instead.

Yeet

Yeets the avatar in ragdoll mode.

  • Yeet Power - Amount of power to apply to the yeet. Setting to 0 will just turn your avatar into ragdoll mode. Number or [parameter]
  • Seconds to respawn - Seconds to wait until respawning. Number or [parameter]
  • Yeet Direction - Direction to yeet your avatar (Backwards, Forwards, Left, or Right)

Flinch

Adds brief flinch effect to your avatar.

  • Flinch Power - Power is scaled from 0 to 1. Number or [parameter]

Add Force

Ragdolls avatar based on exact force values. All fields take a number or [parameter]

  • Force XYZ Amount of force applied to the axis in world space
  • Torque Force XYZ - Amount of torque applied along the axis in world space
  • Seconds to respawn - After how many seconds should the avatar resume default position

File Loading

Play Sound

Play sound effect

  • Sound File - Sound file to play (mp3, ogg o*r wav)
  • Volume - Volume multiplier
  • Duration in milliseconds - Milliseconds to play of the audio
  • Fade Out in milliseconds - Fade volume out during milliseconds

Play Music

PlayMusicNode

Starts playing an audio file. Only one audio file can play at a time

  • Sound File - Sound file to play
  • Volume - Volume to use for the sound
  • Loop - Should the audio loop

Stop Music

Stops the currently playing audio

Load Avatar

Load avatar file

  • Avatar File - Avatar file to load

Load World

Load world

  • World File - World file to load

Animations

Set Pose

PoseNode

Loads and sets VNyan Pose on Avatar. VNyan Poses are JSON files that can be created with the VNyan SDK.

  • Pose - Pose JSON file.
  • Leap Motion after motion - Toggling this will apply leap motion tracking after position if hands are being tracked
  • Blend Values - How much of pose is blended to avatar

A tutorial for how to create VNyan Poses can be found here: https://www.youtube.com/watch?v=XWGh7iv9O6Q

Clear Pose

Clears the loaded VNyan Pose

Save Pose

Saves current avatar bone rotations as VNYan Pose that can be loaded later.

Play Animation

PlayAnimationNode

Plays VNyan Animation on avatar

  • Animation to Play - Animation file from Items/Animations directory
  • Leap Motion after motion - Toggling this will apply leapmotion tracking after animation playback if hands are being tracked
  • Animate Eye Bones - Whether animation should override eye bone rotations.
  • Blend Values - How much of the animation is blended to each bone of the avatar
  • Smooth milliseconds - Number or [parameter]

Set Animation Speed

AnimationSpeedNode

Sets animation injector playback speed

  • Speed - Speed to set for animation playback. Can be negative as well. Number or [parameter]

Stop Animation

Stops currently playing VNyan motions

Record Animation

Records a specified amount of time (in ms) and saves that as a unity humanoid anim-file. Writing the file takes a lot of resources so it's not recommended to use this while streaming.

Play MMD motion

PlayMMDNode

Plays VMD motion on avatar and camera. Note that not all motions play well on Unity humanoid rigs without more precise retargeting. If your motion doesnt work then it might be better to use tools like MMD4Mecanim and then add the motion to vsfavatar.

This node can also add Camera VMD motion. However, Camera motion doesn't work alone.

  • VMD File - Character motion file
  • Camera VMD File - Camera motion file. Requires Character motion to work
  • Music File - Music to play during motion
  • Volume - Volume multiplier for music
  • Lipsync from motion - Apply lipsync blendshapes from motion
  • Head Stiffness - How much the head moves according to motion. Some motions may move the unity humanoid rig head too much, so you can use this to decrease head movement.
  • Camera Y-adjust - Multiplier to move camera along Y-axis
  • Distance multiplier - Multiplier for camera distance

Stop MMD motion

Stops currently playing MMD motion

Camera Nodes

Camera

CameraNode

Swaps camera to saved camera position. Camera positons can be set in Settings.

  • Camera - Camera to activate. Number or [parameter]
  • Transition milliseconds - Milliseconds it takes to move to the camera position. Number or [parameter]

Camera Look At

Sets Camera to look at Avatar with specific smoothing

  • Smoothing - How quickly the camera smooths to target. 0=instant, 1=max smoothing. Number or [parameter]
  • Distance - Camera's distance/zoom. Takes in value between 0.2 and 15. -1=not in use. Number or [parameter]

Camera Smooth

Sets camera's smoothing

  • Smoothing - How quickly the camera reacts to movement. 0=instant, 1=max smoothing. Number or [parameter]

Camera Tilt

Sideways tilt motion for camera

  • Active - Whether to start or stop the effect when triggered
  • Duration - Milliseconds it takes to tilt the camera. Number or [parameter]
  • Tilt Angle - Amount to tilt the camera. Number or [parameter]

Camera Orbit

Camera motion to rotate camera around avatar

  • Active - Whether to start or stop the effect when triggered
  • Speed Multiplier - Speed of the camera rotation around avatar

Set Focal Length

Sets camera's focal length to given value

  • Focal Length - Value to set as the new focal length. -1=set the camera to the default value. Number or [parameter]

Custom Objects

Spawn CObject

SpawnCObjectNode

Spawns Custom Object to specific coordinates

  • Item - List of items that can spawn. Item will be picked randomly from the selected in the list.
  • Destroy after seconds - Amount of seconds until object despawns. Can be value or [parameter]. -1=object is not destroyed automatically.
  • Position - Position value or [parameter] along specific axis
  • Rotation - Rotation value or [parameter] along specific axis
  • Scale - Scale multiplier to make objects bigger/smaller
  • Unique ID - Value that can be used to identify this instance of the Custom Object.

CObject Transform

Moves a custom object to specific position, rotation and scale. You can specify the object using its Object ID set when spawned.

  • Object ID - Value used to identify the instance of the Custom Object.
  • Position x/y/z
  • Rotation x/y/z
  • Scale x/y/z

CObject Force

Applies force and torque to Custom Objects. Applied force can be either relative or in world space. You can specify the object using its Object ID set when spawned.

  • Object ID - Value used to identify the instance of the Custom Object.
  • Force x/y/z
  • Torque x/y/z

Destroy CObject

Destroys Custom Object by ID. You can specify the object using its Object ID set when spawned.

  • ID to destroy - Value used to identify the instance of the Custom Object.

Trigger Nodes

Start Timer

Starts a timer with the given name for specified duration of time. Once the timer ends it'll trigger a Timer callback node.

  • Timer Name - Timer to set.
  • Milliseconds to Trigger - Milliseconds to wait to trigger named timer nodes. Can also take [parameters].

Notes

Generally works by checking every frame if Milliseconds to Trigger has elapsed. This means that there is a lower limit for how short you can make timers based on framerate. For example, 60fps means that each frame runs every 16.667ms, making this the fastest the timer can run. However, setting the timer to be smaller than this limit reduced variance.

Setting the timer to 0ms will ensure that the timer will trigger every frame. For graphs that you want to have running constantly and don't want skipping to occur, for instance if you are animating bone rotations on your avatar, best practice is to set the timer for 0ms.

Call Trigger

Signals the Trigger callback node with specific name either instantly, or on the next frame. This allows the creation of 'functions'. Triggers are shared between all graphs.

  • Trigger Name - Name of the trigger to call
  • When to trigger - Should the trigger be called now/in place, or next frame. When multiple Call Trigger nodes are set to execute now, the triggers are called synchronously according to the order of execution.

Websocket Message

WebsocketMessageNode

Send websocket-message to specified server. To use this node, you will need to activate the WebSockets Receiver under Settings > Misc > WebSockets.

Toggles

Effects that can be turned on/off by triggering the same node multiple times

Toggle Prop

Sets or toggles the visibility of a prop

  • Prop - Prop to adjust, loaded from the Props menu
  • Status - Behaviour of node to toggle, or set visibility on or off.

Spinner

Toggles avatar spinning on or off.

  • Spin Speed - Speed of the spin. Number or [parameter]. This value can also be negative to spin the opposite way.

Water

Toggles the water effect on or off.

  • Direction - Direction of water to toggle (front, top, left, or right)
  • Water color - Color of the water
  • Opacity - Transparency of the water

Slime

Toggles the slime liquid effect on or off.

  • Slime color - Color of the slime
  • Absorption - The amount of light absorbed in the liquid volume. Visually darkens all colors except tho the selected liquid color
  • Scattering - The amount of light being scattered byt the liquid volume. Visually adds a fog to the fluid volume. Max value makes the liquid opaque.

Wind

Turn on VRM springbone wind

  • Wind Direction - Left, right, front, back, or up
  • Wind Power - Power of wind effect

Rain

Toggles 2D rain effect on or off. Supports 5 concurrent rain effects active at once. Toggling rain off will stop the emitter, but will not clear the already created particles

  • Rain Slot - Rain slot to toggle
  • Rain Type - Whether emitter behaviour should like rain, snow, or leaves falling
  • Rain Texture - PNG file to use as particle graphic
  • Density - Density of rain particles
  • Speed - Simulation speed
  • Size - Size of the particles

Integrations

VTSPot TTS

Sends a messatge to the VTSPog application. The application needs to be running and correctly configured.

  • Target - Whether to use TTS or AI voice
  • Message - Message to send. Text or <parameter>
  • User's name - Username for VTSPog to use (only applies to AI). Text or <parameter>

Lovense Action

LovenseActionNode

Sends an action to Lovense toy

  • Action - Action to send
  • Strength - Integer value for strength of action. For most actions this is between 0-20. For pump and depth, this is between 0-3. Does not take decimal values and will round down (for example, 2.4 will become 2.)
  • Seconds - Seconds to perform action. Does not support milliseconds. 0 = indefinite
  • Stop Previous - Stops currently running actions

Note Although Seconds doesn't support millisecond input, you can trigger the node at intervals smaller than a second.

Lovense Preset

LovensePresetNode

Starts a preset on Lovense toy. The presets must be defined in Lovense Remote-app.

  • Preset name - Name of the preset. Currently only the 4 builtin presets (pulse, wave, firewoorks, earthquake) are supported by Lovense Remote
  • Seconds - Seconds to perform action. Does not support milliseconds. 0 = indefinite

Note Although Seconds doesn't support millisecond input, you can trigger the node at intervals smaller than a second.

Avatar Settings

Blendshape Tracking

Enables or disables VMC, ARKit, and lipsync-based blendshape tracking.

Blendshape

Sets existing or non-existing Blendshape Clip value. This will override blendshape tracking.

Only works with Blendshape Clips—Mesh blendshapes are not supported by this node.

  • Blendshape name - Name of the blendshape to set. Can take a .
  • Blendshape value - Value for the blendshape between 0 and 100. 0 will remove the Blendshape-override (you should use the Expression Mapper if you need to set blendshapes to 0). Number or [parameter]
  • Smooth Multiplier - How smoothly will the blendshape turn on. 0 is instant, while 1 will be very smooth
  • Use as toggle - Tuggles turn themselves off when triggered a second time

Reset ARKit

Resets ARKit tracking

Reset All Blendshapes

Resets all blendshapes that have been set with the Blendshape node.

Bone Reset

Reset a specified humanoid bone

  • Bone to Reset - Avatar bone to reset
  • Reset Position - Resets bone's rotation
  • Reset Scale - Resets the scale of the bone

Object Reset

Reset avatar's child object by name

Bone Rotation

BoneRotationNode

Set bone's rotation, overriding tracking and animations.

  • Bone to Rotate - Avatar bone to rotate
  • Space - Space in which bone should be rotated (World or Local)
  • Rotation X/Y/Z - Rotation's X/Y/Z-component in Euler-angles
  • Smooth Time - Time to smooth the rotation in milliseconds. Can also take a [parameter]
  • Is Toggle - Should this node be treated as a toggle?

Additive Bone Rotation

AdditiveBoneRotationNode

Adds rotation to bone after tracking and animations.

  • Bone to Rotate - Avatar bone to rotate
  • Space - Space in which bone should be rotated (World or Local)
  • Rotation X/Y/Z - Rotation's X/Y/Z-component in Euler-angles
  • Smooth Time - Time to smooth the rotation in milliseconds. Can also take a [parameter]

Note These nodes do not stack or add with each other. If you have multiple Additive Bone Rotation nodes targeting the same bone, only one will apply for the final result, overwriting the others.

Bone Scale

Set humanoid bone scale

Object Position

Set Avatar's child object's position

Object Rotation

Set Avatar's child object's rotation

Object Scale

Set Avatar's child object's scale

Object Visibility

Set Avatar's child object's visibility

Avatar Position

Tracking Effect Status

Allows disabling Tracking Effects and turning them back on. Doesn't allow activating Tracking Effects that have been disabled in the Tracking Effect Settings.

Various

Time Scale

Adjust physics time scale

Emote Dropper

Adjust Twitch emote dropper settings

Edit Twitch Redeem

Take Screenshot

Set Resolution

Effects

Post-processing etc effects

Digital Glitch

Ambient Occlusion

Analog Glitch

Binary

Grain

Bloom

Chromatic Aberration

Depth of Field

Motion Blur

Vignette

Rainbow

Pixelation

Lens Dirt

Lens Distorion

Color Grading

Negative Image

Direct Light

Adjust directional light settings

Ambient Light

Adjust ambient light settings

Skysphere

Number Parameters

Nodes for controlling parameters

Set Param

Set parameter value

Param Operation

Simple parameter math operations

Param Math

Volume to Param

Read volume level to parameter

Blendshape to Param

Read blendshape value to parameter

Randomize Param

Randomize parameter value

Transform to Param

Read object's transform to parameters

Tracker to Param

TrackertoParamNode

Copies tracker's transform to parameters

  • Tracker to Read - The target tracker to read
  • Value to Read - Whether to read the World Rotation or World Position of the tracker.
  • Parameter for value - Parameter name where to read the x,y, and z component value into

Lerp Vector

Lerp (Linear Interpolation) is a function that allows blending between two vectors on a linear scale with given percentage. This allows creating smooth transitions from one set of values to another.

For instance, say the position of vector 1 was [5,2,0], and the position of vector 2 was [10,2,0]. With a Lerp value of 0.5, your new vector would be [7.5,2,0] halfway between the two points.

  • Lerp Type - Whether to return the new position or the resulting angle (in degrees)
  • Param X/Y/Z Name - Numeric parameter names to store the new x/y/z values
  • Lerp Value - Lerp percentage value between 0 and 1
  • Value X/Y/Z 1 - First vector's positional values.
  • Value X/Y/Z 2 - Second vector's positional values.

DateTime to Param

Read date or time component to parameter

Number Arrays

Nodes for managing arrays

Enqueue Array

Enqueue decimal value to array

Dequeue Array

Dequeue array value to parameter

Reset Array

Clear array

Count Array

Return amount of items in array to parameter

Array to File

Text Parameters

Text Parameters allow you to store strings in a parameter to use elsewhere. There are some text-specific nodes you can use with these parameters, like Compare Text and the nodes below.

Set Text Param

Sets text parameter value.

  • Parameter Name - Name of the text parameter to set.
  • Param Value - Text to enter for parameter. Can also take <parameter>.

File to Text Param

Loads contesnts of a text file to a text parameter.

  • Text File - Text file to read. If it doesn't exist, then no value is assigned to the parameter
  • Result Text Parameter - Name of parameter to receive the loaded data

Save Text to File

Saves text and/or parameter to a file. The file will be overwritten if it exists.

  • File to Save - Path to file
  • Text to Save - Text or <parameter> to save

Split Text Param

Splits text or text parameter into Text Array. Result will be a Text Array with each index containing the text between each split point.

  • Text to split - Text or param to split
  • Delimiter - Specified character to split the text with
  • TArray Name for Output - Text Array name for split result

Text Arrays

Text Arrays are arrays or lists with every entry being a text value.

Enqueue TArray

Enqueues or loads a new text value to the end of a Text Array.

  • Array Name - Name of the Text Array
  • Value to Enqueue - Value or parameter in brackets to add to the array

Dequeue TArray

Dequeues or unloads the topmost value from the Text Array into a text parameter. Empty array returns empty text, so if you are iterating through the array it's better to check the size of the array using Count TArray

  • Array Name - Name of the text array to dequeue
  • Target Parameter - Name of the text parameter to set

Reset TArray

Clears the contents of the text array

  • Text Array Name - Name of the text array to clear

Count TArray

Gets the size of a Text Array to a number parameter. Returns 0 if array doesn't exist.

  • Array Name - Text array to get the size from
  • Target Parameter - Name for the numeric parameter where to the store the value

Find TArray

Find-operation for Text Arrays. Tries to find the specific text value in the array and returns the index if found.

  • Array Name - Text Array's name to search
  • Value to Find - Text value to search for.
  • Find Result Parameter - Name of a numeric parameter where to store the index. Value will return -1 if not found.

Get TArray

Get-operation for Text Arrays. Gets value from specified index of array and returns it as a text parameter.

  • Array Name - Text Array to use
  • Array Index - Index to get. If out of bounds, then returns empty text.
  • Result Parameter - Text parameter name where to store the result

Set TArray

Set-operation for Text Arrays. Sets the value of an array index to specified value. Array index has to exist for this to work.

  • Array Name - Text Array to use
  • Array Index - Index to set
  • Value to Set - Text and/or parameter value to set to the Text Array index

RemoveAt TArray

RemoveAt-operation for Text Arrays. Removes value at specific index of a Text Array.

  • Array Name - Text Array to use
  • Array Index - Index to remove value. If index doesn't exist then nothing will happen.

File to TArray

Load text file to Text Array. Each line of text will be enqueued into the array.

  • Text File - Text file to load
  • Result Text Array - Name of the array where to load the data. Array will be cleared first.

TArray to File

Saves contents of a Text Array to a file. The file will be overwritten if it exists.

Dictionaries

Container with key/value pairs. For instance, you could store chatter information by using the viewer's name as a key and store multiple values for relevant information for that chatter.

Set Dictionary Value

Get Dictionary Value

Clear Dictionary

Pack Dictionary

Unpack Dictionary

JSON to Dictionary

Clone this wiki locally