-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed the mentioned errors, and added compartment functionality
Former-commit-id: 3ac48d3
- Loading branch information
1 parent
9f5a667
commit 38e5c90
Showing
8 changed files
with
2,184 additions
and
202 deletions.
There are no files selected for viewing
Binary file added
BIN
+13.9 KB
Assets/InsightXR/Samples/Ultimate XR Open Scene/DemoScene Assets/3D models/BoundingCol.fbx
Binary file not shown.
109 changes: 109 additions & 0 deletions
109
.../InsightXR/Samples/Ultimate XR Open Scene/DemoScene Assets/3D models/BoundingCol.fbx.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
183 changes: 183 additions & 0 deletions
183
.../InsightXR/Samples/Ultimate XR Open Scene/DemoScene Assets/Prefabs/CylinderColider.prefab
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!1001 &4245543671836049485 | ||
PrefabInstance: | ||
m_ObjectHideFlags: 0 | ||
serializedVersion: 2 | ||
m_Modification: | ||
serializedVersion: 3 | ||
m_TransformParent: {fileID: 0} | ||
m_Modifications: | ||
- target: {fileID: -8679921383154817045, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
propertyPath: m_LocalScale.x | ||
value: 0.12 | ||
objectReference: {fileID: 0} | ||
- target: {fileID: -8679921383154817045, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
propertyPath: m_LocalScale.y | ||
value: 0.12 | ||
objectReference: {fileID: 0} | ||
- target: {fileID: -8679921383154817045, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
propertyPath: m_LocalScale.z | ||
value: 0.21 | ||
objectReference: {fileID: 0} | ||
- target: {fileID: -8679921383154817045, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
propertyPath: m_LocalPosition.x | ||
value: -4.302 | ||
objectReference: {fileID: 0} | ||
- target: {fileID: -8679921383154817045, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
propertyPath: m_LocalPosition.y | ||
value: 0.897 | ||
objectReference: {fileID: 0} | ||
- target: {fileID: -8679921383154817045, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
propertyPath: m_LocalPosition.z | ||
value: 6.183 | ||
objectReference: {fileID: 0} | ||
- target: {fileID: -8679921383154817045, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
propertyPath: m_LocalRotation.w | ||
value: 0 | ||
objectReference: {fileID: 0} | ||
- target: {fileID: -8679921383154817045, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
propertyPath: m_LocalRotation.x | ||
value: 0 | ||
objectReference: {fileID: 0} | ||
- target: {fileID: -8679921383154817045, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
propertyPath: m_LocalRotation.y | ||
value: 0.22427073 | ||
objectReference: {fileID: 0} | ||
- target: {fileID: -8679921383154817045, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
propertyPath: m_LocalRotation.z | ||
value: -0.9745269 | ||
objectReference: {fileID: 0} | ||
- target: {fileID: -8679921383154817045, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
propertyPath: m_LocalEulerAnglesHint.x | ||
value: 25.92 | ||
objectReference: {fileID: 0} | ||
- target: {fileID: -8679921383154817045, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
propertyPath: m_LocalEulerAnglesHint.y | ||
value: 0 | ||
objectReference: {fileID: 0} | ||
- target: {fileID: -8679921383154817045, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
propertyPath: m_LocalEulerAnglesHint.z | ||
value: -180 | ||
objectReference: {fileID: 0} | ||
- target: {fileID: -8679921383154817045, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
propertyPath: m_ConstrainProportionsScale | ||
value: 0 | ||
objectReference: {fileID: 0} | ||
- target: {fileID: -7511558181221131132, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
propertyPath: m_Enabled | ||
value: 0 | ||
objectReference: {fileID: 0} | ||
- target: {fileID: 919132149155446097, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
propertyPath: m_Name | ||
value: CylinderColider | ||
objectReference: {fileID: 0} | ||
m_RemovedComponents: [] | ||
m_RemovedGameObjects: [] | ||
m_AddedGameObjects: [] | ||
m_AddedComponents: | ||
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
insertIndex: -1 | ||
addedObject: {fileID: 2347746082574750072} | ||
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
insertIndex: -1 | ||
addedObject: {fileID: 1166793487623742017} | ||
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
insertIndex: -1 | ||
addedObject: {fileID: 6519159925598208094} | ||
m_SourcePrefab: {fileID: 100100000, guid: b069d202c402102499a0248ad4e17642, type: 3} | ||
--- !u!1 &3903031705245531420 stripped | ||
GameObject: | ||
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: b069d202c402102499a0248ad4e17642, | ||
type: 3} | ||
m_PrefabInstance: {fileID: 4245543671836049485} | ||
m_PrefabAsset: {fileID: 0} | ||
--- !u!64 &2347746082574750072 | ||
MeshCollider: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 3903031705245531420} | ||
m_Material: {fileID: 0} | ||
m_IncludeLayers: | ||
serializedVersion: 2 | ||
m_Bits: 0 | ||
m_ExcludeLayers: | ||
serializedVersion: 2 | ||
m_Bits: 0 | ||
m_LayerOverridePriority: 0 | ||
m_IsTrigger: 0 | ||
m_ProvidesContacts: 0 | ||
m_Enabled: 1 | ||
serializedVersion: 5 | ||
m_Convex: 0 | ||
m_CookingOptions: 30 | ||
m_Mesh: {fileID: 2534964839176971238, guid: b069d202c402102499a0248ad4e17642, type: 3} | ||
--- !u!65 &1166793487623742017 | ||
BoxCollider: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 3903031705245531420} | ||
m_Material: {fileID: 0} | ||
m_IncludeLayers: | ||
serializedVersion: 2 | ||
m_Bits: 0 | ||
m_ExcludeLayers: | ||
serializedVersion: 2 | ||
m_Bits: 0 | ||
m_LayerOverridePriority: 0 | ||
m_IsTrigger: 0 | ||
m_ProvidesContacts: 0 | ||
m_Enabled: 1 | ||
serializedVersion: 3 | ||
m_Size: {x: 1.9890462, y: 1.9781474, z: 0.07389301} | ||
m_Center: {x: 0, y: 0.010928197, z: 0.96374935} | ||
--- !u!54 &6519159925598208094 | ||
Rigidbody: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 3903031705245531420} | ||
serializedVersion: 4 | ||
m_Mass: 1 | ||
m_Drag: 0 | ||
m_AngularDrag: 0.05 | ||
m_CenterOfMass: {x: 0, y: 0, z: 0} | ||
m_InertiaTensor: {x: 1, y: 1, z: 1} | ||
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} | ||
m_IncludeLayers: | ||
serializedVersion: 2 | ||
m_Bits: 0 | ||
m_ExcludeLayers: | ||
serializedVersion: 2 | ||
m_Bits: 0 | ||
m_ImplicitCom: 1 | ||
m_ImplicitTensor: 1 | ||
m_UseGravity: 0 | ||
m_IsKinematic: 1 | ||
m_Interpolate: 0 | ||
m_Constraints: 126 | ||
m_CollisionDetection: 0 |
7 changes: 7 additions & 0 deletions
7
...ghtXR/Samples/Ultimate XR Open Scene/DemoScene Assets/Prefabs/CylinderColider.prefab.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
Assets/InsightXR/Samples/Ultimate XR Open Scene/DemoScene Assets/scripts/XROffsetGrab.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.XR.Interaction.Toolkit; | ||
public class XROffsetGrab : XRGrabInteractable | ||
{ | ||
// Start is called before the first frame update | ||
void Start() | ||
{ | ||
if (!attachTransform) | ||
{ | ||
GameObject grab = new GameObject("Grab Pivot"); | ||
grab.transform.SetParent(transform, false); | ||
attachTransform = grab.transform; | ||
} | ||
} | ||
|
||
protected override void OnSelectEntering(XRBaseInteractor Interact) | ||
{ | ||
if (Interact is XRDirectInteractor) | ||
{ | ||
attachTransform.position = Interact.transform.position; | ||
attachTransform.transform.rotation = Interact.transform.rotation; | ||
} | ||
|
||
base.OnSelectEntering(Interact); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...ts/InsightXR/Samples/Ultimate XR Open Scene/DemoScene Assets/scripts/XROffsetGrab.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.