![]() |
Humanoid Control for Unity v4
|
The Menu Manager uses two Interaction Pointers for each hand:
The Menu Manager uses a Trigger Sphere Collider to detect if the user has moved too far the the menu to interact with it.
Inherits MonoBehaviour.
Public Member Functions | |
| void | SetMenuActive (bool active) |
| Activates or deactivates the menu and updates the interaction pointer behaviour. | |
Public Attributes | |
| HumanoidControl | humanoid |
| float | menuDistance = 0.5F |
| InteractionPointer | leftMenuPointer |
| InteractionPointer | rightMenuPointer |
| InteractionPointer | leftTeleporter |
| InteractionPointer | rightTeleporter |
Protected Member Functions | |
| virtual void | Awake () |
| Initialization. | |
| HumanoidControl | FindHumanoid () |
| Tries to find the local Humanoid. | |
| void | InitInteractionPointers (HumanoidControl humanoid) |
| Detects the Teleporter and Menu Interaction pointer on the humanoid. | |
| InteractionPointer | GetInteractionPointer (HandTarget handTarget, InteractionPointer invalidPointer=null) |
| Find interaction pointer on the hand. | |
| void | SetControllerInput (HumanoidControl humanoid) |
| void | OnTriggerExit (Collider other) |
| Trigger handler for when an object moves out of the sphere collider. | |
| void | ShowMenu () |
| Show the menu at 'distance' from the players' head. But take core it is not placed inside objects. If this happens, the menu is places closer to the humanoid. | |
| void | HideMenu () |
| Hide the menu. | |
| bool | MenuActive () |
| Is the menu currently visible? | |
| void | EnableMenuPointer (ControllerInput controllerInput) |
| Enable the Menu Pointer. This will also set the controller input. | |
| void | DisableMenuPointer (ControllerInput controllerInput) |
| Disable the Menu Pointer. This will also disable the controller input. | |
| void | EnableTeleporter (ControllerInput controllerInput) |
| Enable the teleporter. This will also set the controller input. | |
| void | DisableTeleporter (ControllerInput controllerInput) |
| Disable the Teleporter. This will also disable the controller input. | |
| void | AdjustOutOfRangeDistance () |
| Adjust trigger sphere collider radius for out-of-range. | |
|
protected |
Tries to find the local Humanoid.
|
protected |
Detects the Teleporter and Menu Interaction pointer on the humanoid.
| humanoid | The humanoid for which the interaction pointers need to be found |
|
protected |
Find interaction pointer on the hand.
| handTarget | The hand to which the Interaction Pointer should be attached |
| invalidPointer | (optional) when give, the interaction pointer should be not euqual to the invalidPointer |
| void Passer.MenuManager.SetMenuActive | ( | bool | active | ) |
Activates or deactivates the menu and updates the interaction pointer behaviour.
| active | Indication whether the menu has to be active |
|
protected |
Is the menu currently visible?
|
protected |
Enable the Menu Pointer. This will also set the controller input.
| controllerInput | The ControllerInput to update |
|
protected |
Disable the Menu Pointer. This will also disable the controller input.
| controllerInput | The ControllerInput to update |
|
protected |
Enable the teleporter. This will also set the controller input.
| controllerInput | The ControllerInput to update |
|
protected |
Disable the Teleporter. This will also disable the controller input.
| controllerInput | The ControllerInput to update |