• Hi Guest!

    We are extremely excited to announce the release of our first Beta1.1 and the first release of our Public AddonKit!
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. For access to the Public AddonKit you must be a Creator tier member. 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.
  • Hi Guest!

    VaM2 Resource Categories have now been added to the Hub! For information on posting VaM2 resources and details about VaM2 related changes to our Community Forums, please see our official announcement here.
Rotate To Target

Plugins + Scripts Rotate To Target

Download [<1 MB]

Clownmug

Well-known member
Joined
Mar 31, 2023
Messages
615
Solutions
24
Reactions
2,648
mr-bison-street-fighter.gif


Seriously, I've been wanting something like this for lighting setups for awhile and I'm honestly surprised VAM doesn't have a "point at target" option for the lights by default.

Wow, it completely slipped my mind that this could be used for lighting. I was only thinking about cameras for some reason. :ROFLMAO:

Edit: Looks like a better plugin already exists now that I looked for ones related to lights. 😅

 
Last edited:
Heya. First thanks for this lil plugin, it's also the first one I found (and I used it only for lights), tbh the name is much more reasonable than Searchlight 😅

Now the bug report. I spent quite a while debugging why one of my plugins was sometimes randomly not receiving any "on atom added/removed/renamed" callbacks from VAM. It looks like having this plugin in the scene can break those callbacks, since it overwrites any existing registered handlers on its activation. This code:
C#:
SuperController.singleton.onAtomAddedHandlers = (a) => MakeTargetAtomList();
SuperController.singleton.onAtomRemovedHandlers = (a) => MakeTargetAtomList();
SuperController.singleton.onAtomUIDRenameHandlers = (a, b) => MakeTargetAtomList();
SuperController.singleton.onAtomUIDsChangedHandlers = (a) => MakeTargetAtomList();
Should use "+=" to add the handlers. Just assigning them nukes any previously registered ones.
 
Heya. First thanks for this lil plugin, it's also the first one I found (and I used it only for lights), tbh the name is much more reasonable than Searchlight 😅

Now the bug report. I spent quite a while debugging why one of my plugins was sometimes randomly not receiving any "on atom added/removed/renamed" callbacks from VAM. It looks like having this plugin in the scene can break those callbacks, since it overwrites any existing registered handlers on its activation. This code:
C#:
SuperController.singleton.onAtomAddedHandlers = (a) => MakeTargetAtomList();
SuperController.singleton.onAtomRemovedHandlers = (a) => MakeTargetAtomList();
SuperController.singleton.onAtomUIDRenameHandlers = (a, b) => MakeTargetAtomList();
SuperController.singleton.onAtomUIDsChangedHandlers = (a) => MakeTargetAtomList();
Should use "+=" to add the handlers. Just assigning them nukes any previously registered ones.

Thanks for the info, I'll update this when I get a chance! Searchlight and a few other plugins do a lot better job and were probably made be people that knew what they were doing, I just threw something together using AlignHelper plugin as a reference. I'm pretty sure those lines are in that plugin too. :oops:
 
Back
Top Bottom