• Hi Guest!

    Please be aware that we have released another critical security patch for VaM. We strongly recommend updating to version 1.22.0.12 using the VaM_Updater found in your installation folder.

    Details about the security patch can be found here.
Camera Pinned UI

Plugins + Scripts Camera Pinned UI

TBD

Well-known member
Messages
432
Reactions
697
Points
93
Patreon
tbdvam
TBD submitted a new resource:

Camera Pinned UI - Pin your scene UI to the desktop camera

Simple plugin to create scene UI's that follow the camera with just a few clicks.

View attachment 390530

How to
  1. Create an empty atom and position it relative to the camera
  2. Add this plugin to the empty atom
  3. In the plugin's UI, select your UI's root element (the top most parent), which should either be an empty atom or any type of UI element
  4. enable/disable the plugin to pin/unpin the UI

Read more about this resource...
 
TBD updated Camera Pinned UI with a new update entry:

UI now always orthogonal to the camera

changelog v4
  • automatically rotates the UI to be orthogonal to the camera
    Sadly, this somehow doesn't work for existing scenes until the UI is unpinned and pinned again.
    If you need manual control over the rotation, just add another Empty atom in between your UI and the atom containing the plugin.
  • fixed some bugs while restoring the plugin during scene load

manual UI alignment in v3 and automatic alignment in v4:
[ATTACH type="full"...

Read the rest of this update entry...
 
TBD updated Camera Pinned UI with a new update entry:

v5

changelog v5
  • Fixed a rare bug affecting users, who have the "Monitor View offset" enabled in their VAM settings. If they open VAM's UI at certain moments during scene load, the pinned scene UI could be affected by the offset.
    (User Preferences -> Misc -> Use Monitor View and Focus Offset When UI is Open)
  • The plugin will now remember the UI's original, unpinned position and rotation when you save a scene with the UI pinned.

Read the rest of this update entry...
 
Hi there. Sorry to interrupt
Not sure if this is the place to raise a question...

Love your plugin so much! and it has almost become a necessary tool for my scene


I am building a character show photo scene and have used a large number of UI buttons to load preset poses (about 250+ UI buttons...). But when I tried to load your plugin onto a UI button, it didn't work



As usual, I aligned an empty atom to its position, loaded the Camera Pinned plugin in the empty atom, opened the plugin setting and selected this UI button, but I noticed that the UI button was only successfully adjusted to face the screen after I set it. But then it stopped in its original spatial position, as if no plug-in had been loaded, but the empty atom was successfully locked on the screen


The plugin worked fine in relatively atomless scenarios, this is the first time I've built a scene with so many atomic buttons, and there were quite a few other bugs

Any ideas?

Sorry for my poor Englisho_O
 
Hi, thanks for the kind words.
Could you send me a scene file showcasing the bug, please? I can't tell what's going on without having a look in this case.
 
Hi, thanks for the kind words.
Could you send me a scene file showcasing the bug, please? I can't tell what's going on without having a look in this case.
That's great!

I tried using hazmhox's Vamstory plugin to drastically reduce the UI number (from 200 UI to a single empty atom that is loading Vamstory) and tried to export var to a brand new VaM directory, and then load your plugin again in this new environment, but failed...


Thank you so much. I'll send you the scene package

here it is!
https://drive.google.com/drive/folders/1iEpILnk0scGf-p52Q9p83Z7Dl2HF3yW4?usp=sharing
 
That's great!

I tried using hazmhox's Vamstory plugin to drastically reduce the UI number (from 200 UI to a single empty atom that is loading Vamstory) and tried to export var to a brand new VaM directory, and then load your plugin again in this new environment, but failed...


Thank you so much. I'll send you the scene package

here it is!
https://drive.google.com/drive/folders/1iEpILnk0scGf-p52Q9p83Z7Dl2HF3yW4?usp=sharing

Honestly, Vamstory might be suited better in your case but I don't see a reason why my plugin shouldn't work.
Regarding your test scene, there's no instance of my plugin anywhere. Please send me a version with it set up and if possible everything but the UI removed.

By the way, why didn't you contact me on my discord's support channel?
 
Hi! Thank you for this plugin, its really a simple and effective solution. I implemented it quite extensively in the new version of my scene SuperVAMDeepthroat. It opens up possibilities to have the same UI work great for VR and Desktop play!

I ran into an issue though and I'm in desperate need of help. If the plugin is used in combination with AccidBubbles Passenger plugin, the UI root node gets starts moving in one direction continuesly. The direction and speed varies and it doesn't happen every time.

I'm assuming this is an issue with float values and possibly physics updates and could be a problem with VAM itself to some degree. The issue might have overlap with what the ParentHoldLink Plugin by BlazeDust tries to solve. The plugin makes sure atoms follow the link via the LateUpdate() function instead of the update function. This solve issues when frames are dropped.

Any chance this plugin can make use of the LateUpdate() function as well? I tried applying the ParentHoldLink Plugin to the root node for my UI pin but it didn't help.

I'm grateful for any help with this. Its really the last issue I have with my UI and I need the passenger plugin for POV in my scene. Driving me nuts.

UPDATE: It seems the problem is worse than I thought. The passenger plugin doesn't have anything to do with it I believe, it was just the constant movement of the camera during pov that made the problem much more obvious.

It looks like a lot of the time when you pin the UI with this plugin it is in a state where camera movements (camera rotations don't do that it seems) will move the parent atom relative location / local offset of the UI pin atom. The root node in turn gets an even stronger offset every frame the camera moves it looks like.
This likely has to do with frame drops and float errors, I'm not certain but it seems the plugin saves a wrong position and then updates the offset incorrectly every frame the camera moves. Frame drops could be the reason it only happens 30-50% of the time with my scene.

I hope this can be fixed, I'm too deep to turn back now lol. If you need any more help, videos etc. please tell me!
 
Last edited:
I'm assuming this is an issue with float values and possibly physics updates and could be a problem with VAM itself to some degree. The issue might have overlap with what the ParentHoldLink Plugin by BlazeDust tries to solve. The plugin makes sure atoms follow the link via the LateUpdate() function instead of the update function. This solve issues when frames are dropped.

Any chance this plugin can make use of the LateUpdate() function as well? I tried applying the ParentHoldLink Plugin to the root node for my UI pin but it didn't help.
The plugin doesn't change atom positions during either update or lateupdate. Instead, it moves atoms into place only once and sets up parenting to the camera rig when you enable/disable it.
To avoid drift, it sets both the parent atom and the rigidbody link (position state = parent) from the empty atom to the camera rig. Could you please confirm whether it's the empty atom holding the plugin that drifts or your UI atoms? If it's the latter, please try setting the parent link manually on your UI root too and see if it helps. If so, I will update the plugin accordingly.

1736235907560.png

You should probably do the same for every UI atom in your tree.
 
Here's a quick update for you to test. It sets up the parent link between your UI root and the atom containing the plugin for you. You'll still have to do the same for your UI tree structure or you'll run into the same issue further down. Set every link to the respective parent.
 

Attachments

  • CameraPinnedUI.cs
    12.3 KB · Views: 0
Here's a quick update for you to test. It sets up the parent link between your UI root and the atom containing the plugin for you. You'll still have to do the same for your UI tree structure or you'll run into the same issue further down. Set every link to the respective parent.
Thank you so much for your quick response and fix! Setting the position and rotation control to parent link on the selected root ui atom seems to do the trick!

When I was trying to manually set the parameters to parent link on my root ui the ui jumped out of frame for me, but when using the updated version of the script you posted the setting gets applied correctly. I setup relays for the UI tree to apply these settings but when trying this on the root ui it always had issues. I'm also enabling and disabling the plugin via triggers, so that might have caused some issues. Those seem to be fixed though so fuck yeah!

Any chance you can update the resource with the new script? Thank you again, 5 stars is the least I can do.
 
Sadly, I'm without my computer for a few days until a new cooler arrives. Please feel free to package the script with your scene in the meantime.
 
Last edited:
Hi, love this thing, but I've got a problem in a new scene I've not seen before. I move the empty and get the buttons added; everything looking fine; then after I save, relaunch, and reload, the Empty "hops up" about half a screen. Or, sometimes, hops DOWN, depending on to where it was adjusted.

Freshly adjusted, saved:
Adjusted and Saved.jpg

Closed, reloaded:
Reloaded and moved.jpg


I'm very confused, as sometimes it stays put, but not every time.

Thoughts? Thanks for your attention!
 
Hi,
sadly I can't tell what's going on from these pictures. Please let me know how to reproduce the issue and maybe I can help.
 
Hi,
sadly I can't tell what's going on from these pictures. Please let me know how to reproduce the issue and maybe I can help.
Well, I'm not sure what is wrong, exactly, but I went ahead and realigned *right after* the Save Scene orientation then re-saved, and it's behaving now.

Thanks for the plugin!
 

Similar threads

Assets + Accessories Camera
Replies
4
Views
2K
Plugins + Scripts UI Tweaks
Replies
12
Views
862
Replies
8
Views
688
Replies
11
Views
960
Back
Top Bottom