• Hi Guest!

    We are extremely excited to announce the release of our first Beta for VaM2, the next generation of Virt-A-Mate which is currently in development.
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.
Auto Aligner

Plugins + Scripts Auto Aligner

Download [<1 MB]

bqbq

Well-known member
Joined
Apr 29, 2024
Messages
138
Solutions
1
Reactions
469
bqbq submitted a new resource:

Auto Aligner - Auto Piston, Automatic Alignment, Auto Dildo

C#:
// AutoAligner.cs
using UnityEngine;
using System.Collections.Generic;
using System.Linq;

namespace Stopper {
    public class AutoAligner : MVRScript {
        JSONStorableStringChooser personChooser;
        UIDynamicPopup personPopup;

        JSONStorableStringChooser boneChooser;
        UIDynamicPopup bonePopup;

        Atom selectedPerson;
        Transform targetBone;
        UIDynamicTextField bonePathLabel;

        Dictionary<string, string> labeledBonePaths = new...

Read more about this resource...
 
Suggested QoL improvement?

C#:
public static void UpdatePersonChoices(this JSONStorableStringChooser jssc)
{
    List<string> choices = new List<string>() { "<none>" };
    choices.AddRange(SuperController.singleton.GetAtoms().Where(a => a.type == "Person").Select(a => a.uid).OrderBy(x => x));
    jssc.choices = choices;
}

public override void Init() {
    personChooser = new JSONStorableStringChooser("person",  new List<string>(), "<none>", "Target Person", (uid) => {
        selectedPerson = SuperController.singleton.GetAtomByUid(uid);
        UpdateBoneList();
    });
    RegisterStringChooser(personChooser);
    personPopup = CreateFilterablePopup(personChooser);
    personPopup.popup.onOpenPopupHandlers += personChooser.UpdatePersonChoices;
    
    // etc...
}
 
Suggested QoL improvement?

C#:
public static void UpdatePersonChoices(this JSONStorableStringChooser jssc)
{
    List<string> choices = new List<string>() { "<none>" };
    choices.AddRange(SuperController.singleton.GetAtoms().Where(a => a.type == "Person").Select(a => a.uid).OrderBy(x => x));
    jssc.choices = choices;
}

public override void Init() {
    personChooser = new JSONStorableStringChooser("person",  new List<string>(), "<none>", "Target Person", (uid) => {
        selectedPerson = SuperController.singleton.GetAtomByUid(uid);
        UpdateBoneList();
    });
    RegisterStringChooser(personChooser);
    personPopup = CreateFilterablePopup(personChooser);
    personPopup.popup.onOpenPopupHandlers += personChooser.UpdatePersonChoices;
   
    // etc...
}
Thank you. Thanks to you, I was able to identify the problem and fix it easily.
 
It's a bit different in direction from the divining rod, so comparing the two doesn't have much meaning. However, I’m not sure if 'Auto Aligner' is a well-made plugin either. I don’t have any knowledge about code.
How is this a better plugin than divining rod?
 
I like the steadyness of the positioning towards the target. But if a rotational offset is defined, it seems to me that the oscillating direction of rotation does not follow the offset direction of rotation.
 
I like the steadyness of the positioning towards the target. But if a rotational offset is defined, it seems to me that the oscillating direction of rotation does not follow the offset direction of rotation.

Good point. I've added sliders. Now the oscillation for position and the oscillation for rotation are separated into their own dedicated sliders.
 
bqbq updated Auto Aligner with a new update entry:

The target list is now displayed correctly.

Previously, only one 'person' was searchable in the filter, and even after deletion, it would still remain in the list.
That issue has been fixed. Now, other added person atoms also appear in the list and can be selected as targets.
Special thanks to misterandy33 for suggesting the revised code.

+

I've added sliders. Now the oscillation for position and the oscillation for rotation are separated into their own dedicated sliders. The rotational pendulum motion has become more powerful.

Read the rest of this update entry...
 
I blame my poor wording.
This is what I meant:

This is what I meant:
DoR.jpg
 
I blame my poor wording.
This is what I meant:

This is what I meant:View attachment 500229
Rotation and position are based on the gizmo's position. They simply point toward the target to determine direction. If the gizmo is tilted but you want the motion to be horizontal, here's a recommended approach: Add an extra horizontal atom, insert the plugin into that atom, and set the asset you want to move to follow the horizontal atom.
 
Эй! Как человек, умеющий кодить, я бы рекомендовал вам вместо ChatGPT взглянуть на Grok Илона Маска — Grok, без сомнения, намного лучше.
 
Эй! Как человек, умеющий кодить, я бы рекомендовал вам вместо ChatGPT взглянуть на Grok Илона Маска — Grok, без сомнения, намного лучше.
Grok is ass
 
Back
Top Bottom