How to change the Anchor Input Listener Behaviour, the original setting is clicked on the screen, I want to change it to judge the Micro Switch high or low signal
Attachment | Size |
---|---|
![]() | 16.59 KB |
How to change the Anchor Input Listener Behaviour, the original setting is clicked on the screen, I want to change it to judge the Micro Switch high or low signal
Attachment | Size |
---|---|
![]() | 16.59 KB |
You have to make your own script for this its very easy:
make a scripts with a reference to the PlaneFinderBehaviour then call the PerformHitTest function in your own method with any position, whenever you call your method it will place the object on the ground plane. here's the script:
public class customTrigger : MonoBehaviour
{
public PlaneFinderBehaviour plane;
void onTrigger()
{
Vector2 pos = new Vector2(0, 0);
plane.PerformHitTest(pos);
}
}
Now you only need to make a script that detects if your switch is low or high and then call the onTrigger() function and your object will appear on the ground plane.