Skip to content

Commit 695fed0

Browse files
authored
Merge pull request #4 from KimNielsen11/main
created meta_interactions.md
2 parents b38d0dc + 6da8d53 commit 695fed0

2 files changed

Lines changed: 68 additions & 2 deletions

File tree

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
## OVRCameraRigInteraction
2+
3+
If you have the CoreSDK/InteractionSDK Assets installed, delete the Default Camera in your scene and just add this prefab into your scene. This Camera works both with Controllers and Handtracking by default.
4+
5+
6+
7+
## Usage
8+
The (hand) interactions made possible with this setup include:
9+
10+
* Grabs (Special Grabs include i.e. Pinch and Pointer)
11+
* Distance Grabs
12+
* Ray Grabs
13+
* Locomotion
14+
* Teleportation
15+
16+
## How to Add Interactions
17+
To add interactions to your OVRCameraRig, all that is required is to modify the state of the object you want to make interactable.
18+
19+
For each type of grab interaction, follow these steps:
20+
21+
Highlight your GameObject, right-click, search for INTERACTION SDK, and choose the type of grab interaction you want to apply to your GameObject.
22+
If your object doesn’t have a Collider or Rigidbody yet, a window will pop up prompting you to click "Create." This will add a child GameObject named "ISDK_...", allowing the object to be interacted with. (This only works because the OVRCameraRigInteraction already has all of the necessary interactors.)
23+
It is recommended NOT to attach every type of interactor to a single GameObject. If you have a large object but only want a small part of it to be interactable, the same rule applies.
24+
25+
There are multiple types of interactions that you can add to a GameObject:
26+
* Hand Grab
27+
* Distance Grab
28+
* Poke
29+
* Ray Grab
30+
* etc.
31+
32+
[For more check out this link](https://developers.meta.com/horizon/documentation/unity/unity-isdk-interaction-sdk-overview/)
33+
34+
## Custom Interactions
35+
36+
To add custom interactions for hand/controllers, you will need to reference the OVRHand class or the appropriate controller class for the controllers you’re using. You can also directly read button inputs using the OVRInput class. For an example of both methods, refer to the MetaPen.cs script, or check the official documentation for [more information](https://developers.meta.com/horizon/documentation/unity/unity-inputactions).
37+
38+
## Locomotion
39+
40+
The OVRCameraRigInteractable prefab already comes with the necessary setup to implement teleporting and turning via hand tracking.
41+
To enable teleportation, you will need to copy HotspotVoidFloor and NavMeshHotspotWalkable from the Meta Locomotion sample scene. This will create a large plane that allows for teleportation. If you want to prevent teleportation through objects, you will also need to copy CollidersTeleportBlocker.
42+
43+
It may be necessary to adjust the Y-axis of HotspotVoidFloor to ensure the floor does not block teleportation.
44+
45+
Alternatively, for more complex environments, you can use the "Add Teleport Quick Action" from the Oculus SDK. You can also bake a NavMesh and add a teleport interactable to it. However, this is not recommended.
46+
47+
## Scirpts
48+
### FireworkSpawn.cs
49+
Added the Firework Spawn script that takes Spawn Object, Spawn Point, Height Offset, Upward Force.
50+
It spawns an object with upward force (firework) when interacted with via a RayInteractor (Hand and Controller).
51+
52+
53+
### Metamovement.cs
54+
Component script in OVRCameraRig to make sure that the left Oculus-joystick of the Player ensures forward/backward/left/right movement even if head is turned.
55+
56+
### TeleportOnTrigger.cs
57+
Added logic from previous, changed the way it teleports a player on entry. Updated teleport spots to stop teleportation from occuring in the ground.
58+
59+
60+
### PraktikumScenario01_RoleManager.cs
61+
Changed varaibles to fit new camera setup. Tweaked logic to ensure it handles the player correctly.
62+
63+
64+
65+
66+
### References
67+
[MetaInteractionSDK](https://developer.oculus.com/documentation/unity/unity-isdk-interaction-sdk-overview/)
68+
[HandTracking](https://developer.oculus.com/documentation/unity/unity-handtracking-overview/)

‎Documentation/docs/getting_started/player_controller.md‎

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)