Searchlight

Plugins Searchlight

I changed the license from CC BY-NC to CC BY-SA.
You can use it for paid content. However, please refrain from distributing it together with paid content.

This plugin keeps the Atom pointing towards another Atom and player. It can be used for searchlights, tracking cameras, UI buttons, etc.

---------------------------------------------------------------------------------------------------
Update (var11):
I changed the license from CC BY-NC to CC BY-SA. There are no changes other than the license.

-------------------------------------------------------------------------------------------------------
Updates (ver.10):
1) Fixed that loading this plugin in a parented Atom child may not work properly. This parenting Atom also contains a SubScene.
2) Target Atom is now set to "None" when the Target Atom set when creating a SubScene does not exist in the new Scene.

--------------------------------------------------------------------------------------------------------
Updates (ver.9):
1) Incorporated a countermeasure against the phenomenon that Atom rotates around the Z axis when the viewpoint is moved when the target is set to [CameraRig]. For this countermeasure, I referred to the exchanges between @JayJayWon and @OnePunchVAM on Discord and OnePunchVAM's FaceCamera. Thank you both.
To enable this function, set Target Atom to [CameraRig] and check "Keep Horizontal to Camera". You can choose any Target Receiver.
2) I narrowed down the items displayed in Target Receiver to only those that are actually valid.
3) Changed the update method inside the plugin from "FixedUpdate" to "Update" to prevent lag. Please let me know if you have any problems.

UI
Searchlight v9 UI.png


Keep Horizontal to Camera : Left = OFF / Right = ON
Searchlight Keep Horizontal.png


---------------------------------------------------------------------------------------------
Update 3:
1) When I load this plugin into a custom UI used in some scenes and plugins, the back of the UI faces the player, so I added the ability to flip 180 degrees.
2) The target atom selection menu hides "Hidden" atoms, reducing the number displayed and making it easier to find the target.

Searchlight CO menu1.png


Usage example 1:
Searchlight
VaM 2022-01-26 09-40-42_Trim_15-169 temp2.gif


Usage example 2:
Keep watching
Passenger plugin use
You may need to adjust the "Physics Rate" and "Physics Update Cap".
VaM 2022-02-07 22-44-18_Trim_0-128 temp.gif




---------------------------------------------------------------------------------------------------------------------------

Update 2:
It turned out that the captured image rotates 90 degrees or 180 degrees when loaded on SpyCam 2.0, but since the previous version could not support it, a function that can directly set the vertical direction of Atom was added.
I intend to ensure compatibility with past versions, but if it does not work properly with scenes created in the past, please specify it again with "Vector 3 direction". If "Vector 3 up" is checked, it is "up", and if it is unchecked, it is "forward".
The demo attached this time requires SpyCam 2.0.

Searchlight UI3.png


Vector3 left
Searchlight left.png


--------------------------------------------------------------
Update:
Added a function that does not respond to small movements of Target. The non-reacting range (Dead Zone) is specified by the slider for each XYZ.
Addition of "Moving Factor" that suppresses movement because the follow-up changes greatly when the Plugin changes from a non-responsive state to a responsive state. There is no suppression when the Moving Factor is 1. The state of 0 has no follow-up.

--------------------------------------------------------------

This plugin always points Atom to Target, so you can turn it into Searchlight by loading it into Invisible Light with Light Type as Spot.
I know that there is "prestigitis_aimConstrain.cs" in a similar plugin, but it hasn't been posted on the HUB, so I decided to publish this plugin.
Find a new way to use this plugin.

Searchlight demo01s.gif


How to use:
Please load this plug-in on Atom that you want to always point to Target such as InvisibleLight, TV, UIButton.
Select Target in "Target Atom".
In "Target Receiver", select where to aim in "Target Atom". In fact, many Atoms other than Person and [CameraRig] can only select control.
You can aim at a place away from "Target Receiver" with "Target adjustment" of XYZ. When "Draw Line" is turned on, a line will be displayed on the screen so that you can clearly see where you are aiming. (Fig.2-4)
If the center of Atom's appearance is far from the control position like a TV, loading this plug-in on the TV will cause the TV to tilt significantly depending on the positional relationship with the Target, so adjust the tilt with "Current adjustment" of XYZ. (Fig.5-7)
When you load this plugin, Atom will always move with the top of Atom facing the ceiling. Therefore, if the Atom moves under the Target, the Atom will rotate 180 degrees on the way. If this is a problem, turning off "Vector3 up" will stop this feature. (Fig.8-9)

note:
If you want to animate Atom with this plugin loaded, exclude Atom Rotation from animation control.
Even when [CameraRig] is set to Target, no special processing such as limiting the tilt is performed for tracking. If there is a problem, please use a dedicated plug-in such as "Spacedog.Rotate_to_camera".

Fig.1 UI
Searchlight UI2.png


Fig.2
Searchlight Person0.png


Fig.3 "Draw Line"
Searchlight Person1.png


Fig.4 Change "Target Y adjustment"
Searchlight Person2.png


Fig.5
Searchlight TV1.png


Fig.6 Change "Target Receiver" from control to headControl
Searchlight TV2.png


Fig.7 Change "Current Y adjustment"
Searchlight TV3.png


Fig.8
Searchlight V3 on.png


Fig.9
Searchlight V3 off.png
  • Searchlight UI.png
    Searchlight UI.png
    61.7 KB · Views: 0
Author
ky1001
Downloads
388,966
Views
388,966
Favorites
2
Packages
1
Version
11
First release
Last update
Rating
5.00 star(s) 4 ratings

More resources from ky1001

Latest updates

  1. Update

    I changed the license from CC BY-NC to CC BY-SA. There are no changes other than the license.
  2. Update

    Updates: 1. Fixed that loading this plugin in a parented Atom child may not work properly. This...
  3. Update

    Updates (ver.9): 1) Incorporated a countermeasure against the phenomenon that Atom rotates...

Latest reviews

Love using this plugin to keep the camera or lights pointed at a person.
Just add to an atom, set the target atom & receiver and it works like expected.
K
ky1001
Thank you for your evaluation. I'm glad you like it.
Upvote 0
I tried it on both camera and lights. The movement is very dynamic and natural. It is also very easy to use. Thank you so much!
K
ky1001
Thank you for your evaluation.
Upvote 0
Combined with Embody or Passenger, this plugin can do even more. Good job!
K
ky1001
Thank you for your evaluation.
Upvote 0
This is amazing! The motion smoothing feature works great! Now in virtual reality it looks very realistic!
K
ky1001
Thank you for your evaluation. Incorporated your advice that it is better to add a function that does not react to small movements.
Upvote 0
Back
Top Bottom