• Hi Guest!

    We have posted a new VaM2 dev log on Patreon, starting a monthly cadence of written progress updates between Beta releases. Highlights include the new Gizmos System, Selection Carousel, and Modes System with Context-Specific Editing. Beta1.2 is 15 of 21 items complete.

    Read the full post on Patreon, or follow progress on the public Trello roadmap.
Embody

Plugins + Scripts Embody

Download [<1 MB]
Hi, I want to bind the Embody toggle to the X button on my Quest 3S left controller. Which joystick button option should I choose?
 
Ah I think I get what you mean; there are multiple options.

The first one is to save your scene. Saving a scene will save the state of the scene, plugins, and all customizations you made to your character. Or you can load my "demo scene" which has everything setup already. You can then load it (I'm taking for granted that you're on Virt-A-Mate's Creator tier) using the main menu.

However if you want to make it easier to load the plugin, you can make "plugin presets". It's not MUCH faster, but it skips the part where you have to scroll in a long list to find Embody.

Finally, the way I personally am doing it is using Keybindings. You can get it here: https://hub.virtamate.com/resources/keybindings.4400/

You can go to the "Session Plugins" from the main menu, and add Keybindings. Then, add KeybindingExtensions_AddPlugin too; in the latter, add Embody. You can now use `:AddPlugin.Embody` (it should autocomplete), press enter, and it'll add Embody on the currently selected Person. You can also map a key to `Embody.ToggleActive` in Keybindings. Now you can go in Session Plugin Presets, and select Change User Defaults. Next time you load VaM, Keybindings and KeybindingsExtensions_AddPlugin will still be in your session plugins, so you can quickly add Embody using the `:` fuzzy find or a shortcut, and use your preferred shortcut to enter and leave possession (I use backtick on the keyboard, it's easy to find even in VR).

So long story short, when you save a scene it'll also save your plugins; if you want to add Embody quickly to any scene, the easiest way I know is using Keybindings.

You might also want to check @JayJayWon's PluginAssist; I didn't have time to look at it yet but it looks like a great solution to make adding plugins easier.
is there a way I can bind key to my vr controller?
 
Hey not sure if this would be kosher to post or not. But I tasked AI with fixing the path issue when loading profiles, exposing the offset camera parameters so most the time I don't even need profiles (my main reason for doing this), and look for any easy performance gains last night. Tried it and it worked properly, but far from extensive. I have 2 versions. .1 was just exposing the offset and fixing the profilepath. .5 included some other changes aimed at QOL and performance. Haven't tested performance really yet, just thought it might be useful to small scene creators. But 1 change I made was to reinitialize on pose change so when I am possessed my head isn't across the room or ruining the pose when I change animations. There is a checkbox to turn it off. Disclaimer I'm just a user of embody and do not claim to understand the inner workings.

https://mega.nz/folder/F2lTgLJK#o2dSTeMPYaTG5n0XCY2oJQ

Behavior changes:
  • Fixed LoadProfileWithPath so it loads the profile directly instead of routing through the file path URL storable.
  • Exposed triggerable JSON storables for Offset Camera:
    • CameraDepthAdjust
    • CameraHeightAdjust
    • CameraPitchAdjust
    • ClipDistance
  • Added trigger/UI controls for pose-change reinitialization:
    • AutoReinitializeOnPoseChange
    • PoseLinkCheckInterval
    • PoseReinitializeCooldown
    • LogPoseReinitialize
  • Added Eye Target LowOverheadMode.
  • Added pose-link monitoring so active possession can quickly deactivate/reactivate if a pose change breaks controller links.
  • Added small active-frame performance tweaks in Passenger, Hide Geometry, and Eye Target.
Important non-change: the internal script path is still Custom/Scripts/AcidBubbles/Embody/..., so the code structure is basically AcidBubbles Embody with targeted patches, not a broad rewrite.

Just sharing in case someone is similar to me and just wants to move the head down and up and not use passenger. AcidBubbles, if you want to take any of this you are welcome to take all or parts of it. Diff for .5 version in mega link as well. I have it named differently to not affect the current version.

.1 version diff. This is all that changed to embody.cs. This is the minimally invasive option.

@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
@@ -125,6 +125,13 @@ public class Embody : MVRScript, IEmbody

presetsJSON = InitPresets();
RegisterStringChooser(presetsJSON);
+ if (offsetCameraModule != null)
+ {
+ RegisterFloat(offsetCameraModule.cameraDepthJSON);
+ RegisterFloat(offsetCameraModule.cameraHeightJSON);
+ RegisterFloat(offsetCameraModule.cameraPitchJSON);
+ RegisterFloat(offsetCameraModule.clipDistanceJSON);
+ }

_context.automation.enabledJSON.val = true;

@@ -193,7 +200,10 @@ public class Embody : MVRScript, IEmbody
RegisterUrl(_loadProfileWithPathUrlJSON);
_loadProfileWithPathJSON = new JSONStorableActionPresetFilePath("LoadProfileWithPath", url =>
{
- _loadProfileWithPathUrlJSON.SetFilePath(url);
+ _loadProfileWithPathUrlJSON.valNoCallback = url;
+ new Storage(_context).LoadProfile(url);
+ _screensManager.Show(null);
+ _screensManager.Show(MainScreen.ScreenName);
}, _loadProfileWithPathUrlJSON);
RegisterPresetFilePathAction(_loadProfileWithPathJSON);
 
Embody never saves the option to stop exiting POV when I open the menu. This is obviously very frustrating in VR. How can I fix?
 

Similar threads

Back
Top Bottom