The interaction pointer is a generic pointer to interact with objects in the scene using the Unity Event system. The objects can receive and react on these interactions when an Unity Event Trigger component has been added to them. The Humanoid Teleporter is an specific implementation of an Interaction Pointer.
An interaction pointer can be added to any object. The objects Transform determines the starting position of the pointer and the pointer will always point in the direction of the Transform Forward.
|Active||Activates and shows the Focus Point Object. It will update the Focus Point Object's Transform and Line Renderer if available.|
|Timed Click||Automatically initiates a click when an Object is in focus for the set amount of seconds. The value 0 disables this function.|
|Focus Point Object||this is the GameObject which represents the focus point of the Interaction Pointer when it is active.|
|Object in Focus||this is the object to which the Interaction Pointer is pointing at. Is updated at runtime.|
|Mode||The ray mode for the pointer. You can choose between a straight line, a bezier curve and a gravity based curve.|
The bezier curve has an additional parameter:
|Maximum Distance||This determines the maximum distance in units you can reach with the curve.|
The interaction pointer has three input events which can be used to call functions when the event occurs. More information on how to use this can be found on the Input page.
|Active||this function is called based on the value of the Active parameter of the Interaction Pointer.|
|Click||this function is called based on the status of the click.|
|Focus||this function is called based on the object in focus.|
Focus Point Object
The Focus Point Object is disabled or enabled automatically when the Interaction Pointer is activated or deactivated.
The Transform of the target point object will be updated based on the ray curve to match the focus point of the Interaction Pointer. It will be aligned with the normal of the surface.
This object can be used to show the focus point of the interaction pointer in the way you like.
When an line renderer is attached to the Focus Point Object, it will automatically be updated to show the line ray casting curve. You can change this line render to your likings. Only the positions will be overwritten when the Interaction Pointer is active.
The following event of the Event System are currently supported:
|PointerDown||is sent to the object in focus when the click starts|
|PointerUp||is sent to the object in focus when the click ends|
|PointerClick||is sent to the object when a click has been completed|
|PointerEnter||is sent to an object when it comes into focus of the Interaction Pointer|
|PointerExit||is sent to an object when it no longer is in focus of the Interaction Pointer|
|BeginDrag||is sent to the object in focus when a click has started and the focus point starts to move|
|Drag||is sent to the object in focus while the focus point changes during a click|
|EndDrag||is sent to the object in focus when the click ends after the focus point started to move|
|void Activation(bool active)||can be used to activate the Interaction Pointer.|
|void Click(bool clicking)||can be used to change the click state of the Interaction Pointer.|