Skip to content

Commit

Permalink
Fixed the mentioned errors, and added compartment functionality
Browse files Browse the repository at this point in the history
Former-commit-id: 3ac48d3
  • Loading branch information
DhruvInsight committed Apr 14, 2024
1 parent 9f5a667 commit 38e5c90
Show file tree
Hide file tree
Showing 8 changed files with 2,184 additions and 202 deletions.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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);
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 38e5c90

Please sign in to comment.