• 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.

How to freeze position and rotation with one click

VRmatt

Active member
Joined
Jul 9, 2022
Messages
249
Solutions
1
Reactions
54
Does anyone know a plugin that would allow one-click to freeze all?
I'd add it to the floor / slate, and furniture nodes, etc (so I don't accidentally move it around during streaming scenes).
Thanks!!
 
One easy solution might be to do this through naming conventions.

Eg. A "-static" postfix in the universal id (uid).

Option A) - Throw all the assets you want to take on this behavior into a subscene with a "-static" postfix.

Option B) - Just add the postfix directly to the Atom names you want to take on the behavior.

It'd be pretty simple

C#:
// retrieve all Atoms with the "-static" postfix.
SuperController.singleton.GetAtomUIDs().Where(str => str.Contains(name + "-static"));

// (inside of a loop,) make each found Atom's controller static
atom.mainController.canGrabPosition = false;
atom.mainController.canGrabRotation = false;
atom.mainController.currentPositionState = FreeControllerV3.PositionState.Lock;
atom.mainController.currentRotationState = FreeControllerV3.RotationState.Lock;

one could check if the found Atom is a subscene, and if so, have another inner loop to apply the code to its child atoms...

I'm trying to wrap up 2 of my own much more complex scripts currently, but I feel a lot of script writers could pump this out within a day if not an hour...
 
Back
Top Bottom