Skip to content

Commit

Permalink
Merge pull request #3 from realitycollective/feature/interaction-docs
Browse files Browse the repository at this point in the history
Add docs for interactions
  • Loading branch information
FejZa authored Jan 4, 2024
2 parents c3f7cb4 + d28ba40 commit fe45a6a
Show file tree
Hide file tree
Showing 50 changed files with 9,618 additions and 5,655 deletions.
7 changes: 7 additions & 0 deletions docs/01-Camera/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"label": "Camera",
"link": {
"type": "generated-index",
"description": "Get started using the Reality Toolkit camera package."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
sidebar_position: 2
---

# Services
# Camera Boundary Module

TODO
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
sidebar_position: 1
---

# Profiles
# Camera Rig Types

TODO
7 changes: 7 additions & 0 deletions docs/01-Camera/camera-service.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 0
---

# Camera Service

TODO
7 changes: 7 additions & 0 deletions docs/02-Interactions/01-interactors/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"label": "Interactors",
"link": {
"type": "generated-index",
"description": "Learn more about Interactors in the Reality Toolkit interaction framework."
}
}
10 changes: 10 additions & 0 deletions docs/02-Interactions/01-interactors/add-interactor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
sidebar_position: 2
---

# How To Add Or Remove An Interactor?

`Interactor`s are added to a controller via the `ControllerProfile`. Select a profile and in the inspector at the bottom you'll find a list of configured Interactors.
Add or remove Interactors as you need, e.g. to make certain Interactors only available on target platform A and not on platform B.

![Interactors Configuration](img/interactors-configuration.png)
32 changes: 32 additions & 0 deletions docs/02-Interactions/01-interactors/available-interactors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
sidebar_position: 1
---

# Available Default Interactors

The toolkit comes with the following predefined and implemented `Interactor`s.

## Near Interactor

The `NearInteractor` interacts with nearby objects. It does not require touching the object but instead it will
focus and interact with interactables that are within a configuratble reach from the controller or hand.

## Far Interactor

The `FarInteractor` allows interactions across distance by pointing your controller or hand at objects that are out of reach.

## Poke Interactor

The `PokeInteractor` is used to trigger interactions by poking / touching objects. It is usually located at the index finger tip or another
convenient location on your controller visualization.

## Teleport Interactor

The `TeleportInteractor` is a special interactor used to teleport from one location to another. It interacts with your app or game
environment to determine the target position.

:::caution

The `TeleportInteractor` is only available if the `RealityToolkit.Locomotion` module is installed via the Package Manager.

:::
18 changes: 18 additions & 0 deletions docs/02-Interactions/01-interactors/custom-interactor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
sidebar_position: 3
---

# How To Write Custom Interactors?

If you must modify the behaviour of a default interactor, you can extend and overrides its implementation by writing your own.
You can also start from scratch and write custom interactors.

:::caution

Writing custom interactors requires a good understanding of the toolkit's inner workings, specifically of the input service.
Make sure to get familiar with the implementation before attemping to create your own interactor. We recommend using the default
interactors. Should you be missing a feature, raise a ticket on the repository and if it is a feature that makes sense for all of
our users, it will be added to the defaults.

:::

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions docs/02-Interactions/01-interactors/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
sidebar_position: 0
---

# What Are Interactors?

An `Interactor` is a special `GameObject` in your scene that enables specific types of interactions with your interactable objects.
Usually an Interactor will be attached to the controller in the scene and perform interactions as input on those controllers is happening.

:::tip

You don't have to worry about setting up `Interactor`s yourself. The default toolkit configuration will make sure they are added to the scene
whenever a compatible controller is detected.

:::
7 changes: 7 additions & 0 deletions docs/02-Interactions/02-interactables/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"label": "Interactables",
"link": {
"type": "generated-index",
"description": "Learn more about Interactables in the Reality Toolkit interaction framework."
}
}
24 changes: 24 additions & 0 deletions docs/02-Interactions/02-interactables/how-to-interactable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
sidebar_position: 1
---

# How To Make A GameObject Interactable?

To make a `GameObject` interactable add the `Interactable` component to it.

![Interactable Component](img/interactable-component.png)

Make sure the `Collider` and `Rigidbody` on the object is configured as you require it.
On the `Interactable` component you can configure whether the Interactable allows
interactions from a distance, direct or both. You can also define `Input Action`s to listen for
from `Interactor`s to perform select or grab interaction.

:::tip

All components of the interaction framework are documented extensively in code.
Make sure to take a look to understand the purpose of each setting.

:::

Congratulations! Your object is now interactable but it will not do anything when interacted with unless
you add `Interaction Behaviour`s to it. Keep on reading to learn about out of the box provided behaviours.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/02-Interactions/02-interactables/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
sidebar_position: 0
---

# What Are Interactables?

An `Interactable` is a `GameObject` in your scene that can be interacted with via `Interactor`s. Each Interactable must have
a `Rigidbody` and a `Collider` attached to it. The default Interactable implementation of the toolkit will enforce this requirement.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"label": "Default Behaviours",
"link": {
"type": "generated-index",
"description": "The toolkit comes with an ever growing catalogue of default interaction behaviours. Learn more about each of them on the upcoming pages."
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 0
---

# ButtonBehaviour

Coming soon...
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 2
---

# ChangeMaterialBehaviour

Coming soon...
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 3
---

# FocusHandPoseBehaviour

Coming soon...
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 4
---

# FocusLockBehaviour

Coming soon...
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 5
---

# GrabBehaviour

Coming soon...
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 6
---

# GrabHandPoseBehaviour

Coming soon...
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 7
---

# InteractionEventsBehaviour

Coming soon...
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 8
---

# PokeResponseBehaviour

Coming soon...
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 9
---

# SyncControllerVisualizerBehaviour

Coming soon...
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 1
---

# ToggleBehaviour

Coming soon...
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 10
---

# TranslateBehaviour

Coming soon...
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 11
---

# UpdateRigidbodyBehaviour

Coming soon...
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"label": "Interaction Behaviours",
"link": {
"type": "generated-index",
"description": "Learn more about Interaction Behaviours in the Reality Toolkit interaction framework."
}
}
Loading

0 comments on commit fe45a6a

Please sign in to comment.