MovementHelper 1.0 by physis

# Instructions

Add plugin directly to a character (Person > Plugins > Add Plugin). It also works on the dildo object and anything else that has a "ForceReceiver" (no lights or cameras unfortunately)

Click the Custom UI button to load the plugin's menu

Load one of the existing presets or create your own movement:

Pick the body part you want to move with the "Receiver" menu in the top left

Pick an axis of movement with the buttons on the left

**Tick the "Enabled" box** for the movement

Play around with the sliders

# UI explanation

**Easing** : The type of easing used for the movement. Illustrations: [https://easings.net/](https://easings.net/)

**Duration**: How long the movement will take in seconds

**Target**: The final destination for the movement

**Range**: The range within which Target can randomly vary. If Target is 50 and Range is 10, The movement will end up somewhere between 40 and 60.

**Duration Range**: The range within which Duration can randomly vary, in seconds. If duration is 5 and Duration Range is 1, the movement will take somewhere between 4 and 6 seconds.

**Duration Update Interval**: The amount of time between duration updates, in seconds. This is useful for varying the speed of a cycling motion every few seconds, rather than with every cycle (see the PelvisThrust preset for an example)

**Delay**: The amount of time *after* a target is reached until a new movement begins, in seconds

**Delay Range**: The range within which Delay can randomly vary, in seconds. You get the idea.

**Target Two**: If Target Two is enabled, the movement will alternate between Target and Target Two (or within the random ranges of each)

**Target Two Range**: The range within which Target Two can randomly vary

**Enable Timing Sync**: Constantly syncs the following values with the Movement selected in the "Sync With" dropdown: Duration, Duration Range, Duration Update Interval, Delay, Delay Range 

**Copy From**: Does a one-time transfer of all values from the movement selected in the dropdown

# Tips, FAQ and Limitations

**All values will reset to 0 when you load a new look! Save a preset first.** This is really annoying and I don't know what causes it. **Does anyone know how to fix it?**

If Target is set to a value, but Range and Target Two are 0, then the movement will reach Target and stop. You need to either give Target a Range to move around within, or set Target Two so the movement can alternate.

Q: Nothing is moving! 

A: Make sure you selected a receiver; make sure you've ticked the enable box on the relevant movement; make sure duration is not 0; make sure either Range or Target Two is not 0

Q: **The script sometimes fails to compile when I load it** 

A: Yeah sorry this happens sometimes. Load it again and it will be fine. (This is an issue with having multiple classes in the same script file. The solution would be to split them up over multiple files, but this would clog up the Plugins list even more. Maybe in the next version...)

Q: The movement isn't as fast / responsive as I want A: Don't forget physics settings. Try increasing Hold Position Spring and Hold Rotation Spring for whatever you are moving

# Credits

Thanks to:

hsthrowaway5 for the code in the FloatMultiParamRandomizer plugin, especially the Save/Load preset functionality.

VamDazzler and VamDeluxe for their help in the scripting channel on Discord

&#x200B;

# Sample Usage

Let's try and create some natural-looking head movement.

First we set the Receiver to "head"

We'll start with a gentle up and down nodding movement. Click the Torque X button and tick the Torque X Enabled tickbox 

Now let's go down the sliders one by one:

Duration: We want a fairly slow movement, so let's set duration to 3. This means each movement will take three seconds to complete 

Target: We'll leave this on 0, so that our baseline is looking straight ahead 

Range: We want the head to move to a random position within a certain range of our baseline (0). 30 seems like a good value here 

Duration Range: Let's add some randomness by changing the duration a bit. Set this to 1. Now instead of always taking three seconds, the movement will take somewhere between two and four (31) seconds. 

Duration Update Interval: Let's leave this at 0 so that a new random duration is generated for each new movement

Easing: Let's add a bit more variety by setting this to Cubic InOut. Now the head movement speeds up a bit in the middle of its journey

Delay: We don't want the head to move constantly. Let's change this to 5 so that we have a five second rest between each new movement

Delay Range: A five second gap every time would be too predictable, so let's change the delay range to 2. Now the rest between each movement is somewhere between three and seven seconds 

So to summarise: Every 3-5 seconds the head will start a movement to a new position within 30 degrees of 0 that will take 2-4 seconds to complete. 

Because we are moving to a random position within a certain range of 0, we can ignore Target Two. If we wanted to guarantee that the head alternates between a positive (up) and negative (down) movement, we would set Target to a positive value, and Target Two to a negative value. 

That takes care of Torque X (head up and down). But we also want some side-to-side movement (Torque Y) and some roll (Torque Z). Let's make life easier by just copying the values from Torque X: Click the Torque Y button, click the "Copy From" dropdown and select Torque X. All the values will be copied over. Do the same for Torque Z.

But wait! Instead of our nice five second delay between movements, we are now getting some Torque Y and Z movement happening in the gaps. We need to sync up all the timings so that the three Torques change together:

Go to Torque Y and tick the "Enable Timing Sync" toggle. Pick "Torque X" from the dropdown. Do the same for Torque Z.

Now all the timing values (duration, duration range, duration update interval, delay, delay range) for Torque Y and Z will be ignored. They will use the values from Torque X instead and we get a single movement.

You might have to go back to the Main Menu and press the "Reset Timers" button to get the three Torques in sync.

&#x200B;