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
Keep Horizontal to Camera : Left = OFF / Right = ON
---------------------------------------------------------------------------------------------
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.
Usage example 1:
Searchlight
Usage example 2:
Keep watching
Passenger plugin use
You may need to adjust the "Physics Rate" and "Physics Update Cap".
---------------------------------------------------------------------------------------------------------------------------
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.
Vector3 left
--------------------------------------------------------------
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.
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
Fig.2
Fig.3 "Draw Line"
Fig.4 Change "Target Y adjustment"
Fig.5
Fig.6 Change "Target Receiver" from control to headControl
Fig.7 Change "Current Y adjustment"
Fig.8
Fig.9
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
Keep Horizontal to Camera : Left = OFF / Right = ON
---------------------------------------------------------------------------------------------
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.
Usage example 1:
Searchlight
Usage example 2:
Keep watching
Passenger plugin use
You may need to adjust the "Physics Rate" and "Physics Update Cap".
---------------------------------------------------------------------------------------------------------------------------
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.
SpyCam&Tablet - Assets -
I've made a few changes from 1.0, I've changed the tablet mesh and given it some more realistic materials as well as a camera HUD. The camera itself also comes with a few zoom options. How To Use: Download zip. Extract the .assetbundle inside...
hub.virtamate.com
Vector3 left
--------------------------------------------------------------
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.
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
Fig.2
Fig.3 "Draw Line"
Fig.4 Change "Target Y adjustment"
Fig.5
Fig.6 Change "Target Receiver" from control to headControl
Fig.7 Change "Current Y adjustment"
Fig.8
Fig.9