generated from VR-Sexe/Unity3DTemplate
Merge remote-tracking branch 'origin/Scripting' into Assets
This commit is contained in:
parent
3612d56e04
commit
518e6d2137
@ -45,6 +45,10 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 7310167259df75745b825087bf4c8de0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
combinedBounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
wallMount: 1
|
||||
--- !u!1001 &8069903224663295423
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
8
Assets/Oculus/SampleFramework.meta
Normal file
8
Assets/Oculus/SampleFramework.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 33447c8a863894d4bbf1cef27bfebf3b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Oculus/SampleFramework/Usage.meta
Normal file
8
Assets/Oculus/SampleFramework/Usage.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b578b5744fda3641a8d996a918ec63a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Oculus/VR.meta
Normal file
8
Assets/Oculus/VR.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c30f884b9f976b846a902f421e77c369
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Oculus/VR/Plugins.meta
Normal file
8
Assets/Oculus/VR/Plugins.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1f06b56b3e7614419c5db24e2262938
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Oculus/VR/Plugins/1.79.0.meta
Normal file
8
Assets/Oculus/VR/Plugins/1.79.0.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06e3f397f334afc4c9e9147486c1394c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Oculus/VR/Plugins/1.79.0/Win64OpenXR.meta
Normal file
8
Assets/Oculus/VR/Plugins/1.79.0/Win64OpenXR.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 60733b08805636e408e2d2c443f1d7f0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/VR/Plugins/1.79.0/Win64OpenXR/OVRPlugin.dll
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/VR/Plugins/1.79.0/Win64OpenXR/OVRPlugin.dll
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,27 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfdf91cb91d3f2045bd3714bcd05fd7c
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -97,7 +97,7 @@ LightmapSettings:
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 112000000, guid: b0920c1f3a4585c42a14752ac957e6b1, type: 2}
|
||||
m_LightingDataAsset: {fileID: 112000000, guid: 513619d267b6f204fb3ddc20611ca1ff, type: 2}
|
||||
m_LightingSettings: {fileID: 4890085278179872738, guid: e0d1b39396743fc4da42f1d1948a6570, type: 2}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
@ -3000,7 +3000,7 @@ Mesh:
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: pb_Mesh37068
|
||||
m_Name: pb_Mesh23788
|
||||
serializedVersion: 10
|
||||
m_SubMeshes:
|
||||
- serializedVersion: 2
|
||||
@ -3369,6 +3369,7 @@ MonoBehaviour:
|
||||
combinedBounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
wallMount: 0
|
||||
--- !u!1001 &366020801
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -3573,7 +3574,7 @@ Mesh:
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: pb_Mesh37182
|
||||
m_Name: pb_Mesh23902
|
||||
serializedVersion: 10
|
||||
m_SubMeshes:
|
||||
- serializedVersion: 2
|
||||
@ -4526,7 +4527,7 @@ Mesh:
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: pb_Mesh37438
|
||||
m_Name: pb_Mesh24158
|
||||
serializedVersion: 10
|
||||
m_SubMeshes:
|
||||
- serializedVersion: 2
|
||||
@ -7487,7 +7488,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5262755222010251265, guid: 481a02167edfebe44883f5868f8a27f9, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 1.6517086
|
||||
value: 1.682
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5262755222010251265, guid: 481a02167edfebe44883f5868f8a27f9, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
@ -7804,7 +7805,7 @@ Mesh:
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: pb_Mesh37512
|
||||
m_Name: pb_Mesh24232
|
||||
serializedVersion: 10
|
||||
m_SubMeshes:
|
||||
- serializedVersion: 2
|
||||
@ -8239,7 +8240,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447954, guid: dc06161b6d97feb419f45f03b62e14b9, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 3.34
|
||||
value: 2.764
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447954, guid: dc06161b6d97feb419f45f03b62e14b9, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
@ -8247,11 +8248,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447954, guid: dc06161b6d97feb419f45f03b62e14b9, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 1.16
|
||||
value: -1.091
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447954, guid: dc06161b6d97feb419f45f03b62e14b9, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: -0.64922154
|
||||
value: -0.9963591
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447954, guid: dc06161b6d97feb419f45f03b62e14b9, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
@ -8259,7 +8260,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447954, guid: dc06161b6d97feb419f45f03b62e14b9, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.76059943
|
||||
value: -0.085256256
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447954, guid: dc06161b6d97feb419f45f03b62e14b9, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
@ -8271,7 +8272,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447954, guid: dc06161b6d97feb419f45f03b62e14b9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: -459.034
|
||||
value: -350.218
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447954, guid: dc06161b6d97feb419f45f03b62e14b9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
@ -8286,7 +8287,7 @@ Mesh:
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: pb_Mesh23932
|
||||
m_Name: pb_Mesh23940
|
||||
serializedVersion: 10
|
||||
m_SubMeshes:
|
||||
- serializedVersion: 2
|
||||
@ -8913,7 +8914,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5262755222010251265, guid: 481a02167edfebe44883f5868f8a27f9, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -0.4088473
|
||||
value: -0.486
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5262755222010251265, guid: 481a02167edfebe44883f5868f8a27f9, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
@ -10584,6 +10585,7 @@ MonoBehaviour:
|
||||
combinedBounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
wallMount: 0
|
||||
--- !u!4 &1889890278 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 5262755222010251265, guid: 481a02167edfebe44883f5868f8a27f9, type: 3}
|
||||
@ -11930,7 +11932,7 @@ Mesh:
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: pb_Mesh23872
|
||||
m_Name: pb_Mesh23880
|
||||
serializedVersion: 10
|
||||
m_SubMeshes:
|
||||
- serializedVersion: 2
|
||||
|
||||
BIN
Assets/Scenes/FabLab/FabLab/ReflectionProbe-0.png
(Stored with Git LFS)
BIN
Assets/Scenes/FabLab/FabLab/ReflectionProbe-0.png
(Stored with Git LFS)
Binary file not shown.
@ -101,6 +101,54 @@ TextureImporter:
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Windows Store Apps
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
|
||||
@ -100,8 +100,13 @@ public class Catalog : MonoBehaviour
|
||||
furrnitureBall.transform.localScale *= rescale;
|
||||
furrnitureBall.transform.localPosition = Vector3.down * 0.2f;
|
||||
sphere.SetActive(true);
|
||||
<<<<<<< Updated upstream
|
||||
//hand.GetGrabStarting
|
||||
hand.AttachObject(sphere, GrabTypes.Trigger);
|
||||
=======
|
||||
//hand.GetGrabStarting
|
||||
hand.AttachObject(sphere, GrabTypes.Trigger);
|
||||
>>>>>>> Stashed changes
|
||||
currentSphere = sphere;
|
||||
}
|
||||
|
||||
@ -127,7 +132,7 @@ public class Catalog : MonoBehaviour
|
||||
|
||||
public void OnGrabSphere(CatalogElement sphere)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void OnReleaseSphere(CatalogElement sphere, Valve.VR.InteractionSystem.Hand hand)
|
||||
@ -135,5 +140,5 @@ public class Catalog : MonoBehaviour
|
||||
hand.DetachObject(sphere.gameObject);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ public class FurnitureMover : MonoBehaviour
|
||||
{
|
||||
Grabbing.SnapTo(SnapHit.point, AutoPlacementEnvironmentMask, transform.forward);
|
||||
}
|
||||
|
||||
|
||||
if (previousContact && previousContact != hit.transform)
|
||||
{
|
||||
PointerEventArgs args = new PointerEventArgs();
|
||||
@ -175,7 +175,7 @@ public class FurnitureMover : MonoBehaviour
|
||||
|
||||
public void GrabFurniture(GameObject furniture)
|
||||
{
|
||||
Catalog.Instance.GrabObject(furniture, gameObject.GetComponent<Hand>());
|
||||
//Catalog.Instance.GrabObject(furniture, gameObject.GetComponent<Hand>());
|
||||
}
|
||||
|
||||
public void ReleaseFurniture(GameObject furniture)
|
||||
|
||||
@ -6,6 +6,7 @@ public class MovableFurniture : Furniture
|
||||
private List<Transform> children;
|
||||
private List<ObjectOutline> outlines;
|
||||
private Rigidbody _rigidbody;
|
||||
public bool wallMount;
|
||||
|
||||
// Start is called before the first frame update
|
||||
new void Start()
|
||||
@ -68,8 +69,8 @@ public class MovableFurniture : Furniture
|
||||
outline.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void SnapTo(Vector3 position, LayerMask layerMask, Vector3 direction)
|
||||
|
||||
/*public void SnapTo(Vector3 position, LayerMask layerMask, Vector3 direction)
|
||||
{
|
||||
Vector3 displacement = Vector3.zero;
|
||||
this.transform.position = position + centerOffset;
|
||||
@ -87,20 +88,51 @@ public class MovableFurniture : Furniture
|
||||
}
|
||||
}
|
||||
|
||||
/*Ray raycast = new Ray((transform.position - centerOffset) - (new Vector3(0, 0, combinedBounds.extents.z)), (new Vector3(0, 0, combinedBounds.size.z )));
|
||||
RaycastHit hit;
|
||||
bool SnapbHit = Physics.Raycast(raycast, out hit, combinedBounds.size.z, layerMask);
|
||||
if (SnapbHit)
|
||||
{
|
||||
Debug.Log("Hit");
|
||||
//displacement.z -= (0 % 2 == 1 ? -1 : 1) * (2*combinedBounds.size.z - (hit.distance));
|
||||
displacement.z -= (combinedBounds.size.z - (hit.distance));
|
||||
}*/
|
||||
this.transform.Translate(displacement, Space.World);
|
||||
}
|
||||
}*/
|
||||
|
||||
public void SnapTo(Vector3 position, LayerMask layerMask, Vector3 direction)
|
||||
{
|
||||
Vector3 previousPosition = transform.position;
|
||||
Vector3 offset = Vector3.zero;
|
||||
if (wallMount)
|
||||
{
|
||||
transform.position = position;
|
||||
Bounds objectBounds = GetComponent<Collider>().bounds;
|
||||
Vector3 objectSize = objectBounds.size;
|
||||
offset = new Vector3(objectSize.x / 2, objectSize.y / 2, objectSize.z / 2);
|
||||
Collider[] colliders = Physics.OverlapBox(transform.position + offset, offset, transform.rotation, layerMask);
|
||||
if (colliders.Length > 0)
|
||||
{
|
||||
for (int i = 0; i < colliders.Length; i++)
|
||||
{
|
||||
offset += colliders[i].bounds.ClosestPoint(transform.position) - transform.position;
|
||||
}
|
||||
offset /= colliders.Length;
|
||||
transform.position += offset;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector3 newPosition = new Vector3(position.x, transform.position.y, position.z);
|
||||
transform.position = newPosition;
|
||||
Bounds objectBounds = GetComponent<Collider>().bounds;
|
||||
Vector3 objectSize = objectBounds.size;
|
||||
offset = new Vector3(objectSize.x / 2, objectSize.y / 2, objectSize.z / 2);
|
||||
Collider[] colliders = Physics.OverlapBox(transform.position + offset, offset, transform.rotation, layerMask);
|
||||
if (colliders.Length > 0)
|
||||
{
|
||||
for (int i = 0; i < colliders.Length; i++)
|
||||
{
|
||||
offset += colliders[i].bounds.ClosestPoint(transform.position) - transform.position;
|
||||
}
|
||||
offset /= colliders.Length;
|
||||
transform.position += offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnDrawGizmos()
|
||||
void OnDrawGizmos()
|
||||
{
|
||||
// Draw a yellow sphere at the transform's position
|
||||
Gizmos.color = Color.red;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user