Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Pointer): allow pointers to interact with interactable objects
A new option on a World Pointer has been added `interactWithObjects` that adds a new collider to the controller that the pointer is associated with that tracks the position of the tip of the pointer. This means that the new collider will be used in the compound colliders of the controller and therefore anything the pointer is touching will be as if the controller is touching it. This means that the pointer will be able to highlight objects on touch, but also when grabbing will snap the item to the controller and will also allow the use action to be triggered remotely using the mapped `Use` button on the controller. The `pointerActivatesUseAction` on the interactable object is still a valid mechanism as it initiates the use action on an interactable object when the pointer is enabled and disabled and does not need the `Use` button on the controller pressing. It also prevents teleporting when this option is checked, whereas just using the pointer as an extension of the controller wouldn't surpress the teleport event by default.
- Loading branch information
1 parent
4adf75d
commit ae31ddd
Showing
4 changed files
with
68 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters