Compare commits

...

2 Commits

Author SHA1 Message Date
4f64ca28fd Fix prefab pivot and advancing on furnitureMover 2023-01-23 16:59:00 +01:00
a458ca5f57 Fix pivot points for furniture 2023-01-23 15:58:22 +01:00
14 changed files with 377 additions and 54 deletions

View File

@ -27,7 +27,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 999207089627997314}
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: -0}
m_LocalPosition: {x: 0, y: 0.039, z: -0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
@ -122,7 +122,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5022219494863929666}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 4.2239313, y: 1.046101, z: -0.024066806}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -146,6 +146,7 @@ MonoBehaviour:
combinedBounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
wallMount: 0
--- !u!1 &8294151951189356629
GameObject:
m_ObjectHideFlags: 0
@ -173,7 +174,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8294151951189356629}
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: -0}
m_LocalPosition: {x: 0, y: 0.039, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []

View File

@ -25,7 +25,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6502689968648656832}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 3.9697971, y: 1.0193512, z: -1.9544978}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
m_ConstrainProportionsScale: 1
m_Children:
@ -48,6 +48,7 @@ MonoBehaviour:
combinedBounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
wallMount: 0
--- !u!1001 &743310008199716879
PrefabInstance:
m_ObjectHideFlags: 0

View File

@ -1,5 +1,50 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &392586589562003607
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6114432350300135443}
- component: {fileID: 8817835740557246532}
m_Layer: 9
m_Name: FurnitureTrigger
m_TagString: FurnitureTrigger
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6114432350300135443
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 392586589562003607}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3674349604157782260}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &8817835740557246532
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 392586589562003607}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 12.237078, y: 6.518132, z: 9.380431}
m_Center: {x: 0.1100985, y: 3.444804, z: -0.26158008}
--- !u!1 &1253093426770874476
GameObject:
m_ObjectHideFlags: 0
@ -72,8 +117,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2048859290140646716}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 5.0600014, y: 6.87, z: -3.75}
m_LocalScale: {x: 1, y: 0.94424, z: 1}
m_LocalPosition: {x: 5.0600014, y: 6.87, z: -3.9438}
m_LocalScale: {x: 1, y: 0.94424, z: 1.0554}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3674349604157782260}
@ -152,6 +197,7 @@ GameObject:
m_Component:
- component: {fileID: 3674349604157782260}
- component: {fileID: 7152506842566364840}
- component: {fileID: 5516512649396120673}
m_Layer: 0
m_Name: Simple table
m_TagString: Untagged
@ -174,6 +220,7 @@ Transform:
- {fileID: 7846351332623750186}
- {fileID: 705425444331171642}
- {fileID: 5160726694365660193}
- {fileID: 6114432350300135443}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -189,6 +236,26 @@ 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: 0
--- !u!54 &5516512649396120673
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4158574887593288270}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!1 &6146061087085142095
GameObject:
m_ObjectHideFlags: 0

View File

@ -1,5 +1,50 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3884115040606308642
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6821231163936271320}
- component: {fileID: 6695299937866651750}
m_Layer: 9
m_Name: FurnitureTrigger
m_TagString: FurnitureTrigger
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6821231163936271320
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3884115040606308642}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5262755222010251265}
m_RootOrder: 13
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &6695299937866651750
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3884115040606308642}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 4.568707, y: 7.746119, z: 5.480494}
m_Center: {x: -0.1474282, y: 4.3566036, z: -0.06824057}
--- !u!1 &8231086993610971755
GameObject:
m_ObjectHideFlags: 0
@ -278,6 +323,26 @@ 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: 0
--- !u!54 &5577736131529907943
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4774624094512517819}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!4 &5035235579416466379 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 820629935725706273, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}

View File

@ -24,7 +24,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4699182198977620406}
m_LocalRotation: {x: -0, y: -0, z: 0.70710576, w: 0.70710784}
m_LocalPosition: {x: -0.51733893, y: 1.621, z: -1.4194237}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -58,7 +58,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5078885061494400643}
m_LocalRotation: {x: -0.00000005960465, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.62495, z: -0.25492}
m_LocalPosition: {x: 0.168, y: 0.113, z: -0.229}
m_LocalScale: {x: -0.16656025, y: -0.16656025, z: -0.16656025}
m_ConstrainProportionsScale: 0
m_Children: []

View File

@ -260,6 +260,7 @@ GameObject:
- component: {fileID: 2996515769384266075}
- component: {fileID: 2709258200819239477}
- component: {fileID: 6645681851711596344}
- component: {fileID: 1547886741423616364}
m_Layer: 0
m_Name: shelf_empty
m_TagString: Untagged
@ -288,6 +289,7 @@ Transform:
- {fileID: 1696234186987782576}
- {fileID: 2781697966167280641}
- {fileID: 5613503160827514234}
- {fileID: 5878205338461874499}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
@ -306,6 +308,7 @@ MonoBehaviour:
combinedBounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
wallMount: 0
--- !u!65 &6645681851711596344
BoxCollider:
m_ObjectHideFlags: 0
@ -319,6 +322,22 @@ BoxCollider:
serializedVersion: 2
m_Size: {x: 2.017374, y: 1.4093293, z: 4.320848}
m_Center: {x: -0.0065603256, y: 0.012041539, z: 2.1498158}
--- !u!54 &1547886741423616364
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2512467202128557025}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!1 &2602268122132683364
GameObject:
m_ObjectHideFlags: 0
@ -568,6 +587,51 @@ MeshRenderer:
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &4588887904168053738
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5878205338461874499}
- component: {fileID: 9184669346505142783}
m_Layer: 9
m_Name: FurnitureTrigger
m_TagString: FurnitureTrigger
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5878205338461874499
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4588887904168053738}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2996515769384266075}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &9184669346505142783
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4588887904168053738}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1.9363493, y: 1.3597183, z: 4.2336807}
m_Center: {x: -0.016334474, y: 0.029815674, z: 2.1933994}
--- !u!1 &4983300697117577925
GameObject:
m_ObjectHideFlags: 0

View File

@ -1,5 +1,50 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &451019611259114879
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2833408188615038500}
- component: {fileID: 777966934955362417}
m_Layer: 9
m_Name: FurnitureTrigger
m_TagString: FurnitureTrigger
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2833408188615038500
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 451019611259114879}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 589337997038399236}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &777966934955362417
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 451019611259114879}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 40.602814, y: 20.834862, z: 1.929568}
m_Center: {x: 0.19675513, y: 8.908121, z: -1.2512306}
--- !u!1 &2835658414891243653
GameObject:
m_ObjectHideFlags: 0
@ -30,6 +75,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6063464173187445548}
- {fileID: 2833408188615038500}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -86,7 +132,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 4313268324301600403, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
propertyPath: m_LocalPosition.z
value: 0
value: -1.36
objectReference: {fileID: 0}
- target: {fileID: 4313268324301600403, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
propertyPath: m_LocalRotation.w

View File

@ -24,14 +24,14 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 726151543146820464}
m_LocalRotation: {x: -0, y: 1, z: -0, w: 0}
m_LocalPosition: {x: 2.6100001, y: 1.8444445, z: -0.12111112}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.11111112, y: 0.11111112, z: 0.11111112}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 726151543547972459}
- {fileID: 726151544272545065}
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!1 &726151543547972456
GameObject:
@ -59,7 +59,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 726151543547972456}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0, y: 0, z: 0}
m_LocalPosition: {x: 2.73, y: 7.08, z: -3.48}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
@ -142,7 +142,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 726151544272545062}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0, y: 0, z: 0}
m_LocalPosition: {x: 2.73, y: 7.08, z: -3.48}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []

View File

@ -2392,26 +2392,26 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1705480523}
- {fileID: 808552922}
- {fileID: 1329833008}
- {fileID: 260182308}
- {fileID: 765875807}
- {fileID: 1290121936}
- {fileID: 1527984575637916538}
- {fileID: 1705480523}
- {fileID: 808552922}
- {fileID: 146814758}
- {fileID: 896101879}
- {fileID: 1455652491}
- {fileID: 1672585692}
- {fileID: 435302310}
- {fileID: 336078038}
- {fileID: 1173886246}
- {fileID: 1821824934}
- {fileID: 293073269}
- {fileID: 1782748918}
- {fileID: 336078038}
- {fileID: 60326086}
- {fileID: 670219875}
- {fileID: 373875250}
- {fileID: 1173886246}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -6516,7 +6516,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3674349604157782260, guid: b4f1c52a4d9acc94da08e9006d9fd5e0, type: 3}
propertyPath: m_LocalPosition.z
value: 0.04261017
value: 0.123
objectReference: {fileID: 0}
- target: {fileID: 3674349604157782260, guid: b4f1c52a4d9acc94da08e9006d9fd5e0, type: 3}
propertyPath: m_LocalRotation.w
@ -6912,7 +6912,7 @@ Transform:
m_Children:
- {fileID: 936418819}
m_Father: {fileID: 45957245}
m_RootOrder: 15
m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &360260901
PrefabInstance:
@ -11842,7 +11842,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3674349604157782260, guid: b4f1c52a4d9acc94da08e9006d9fd5e0, type: 3}
propertyPath: m_LocalPosition.z
value: 0.04261017
value: 0.119
objectReference: {fileID: 0}
- target: {fileID: 3674349604157782260, guid: b4f1c52a4d9acc94da08e9006d9fd5e0, type: 3}
propertyPath: m_LocalRotation.w
@ -13405,7 +13405,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3674349604157782260, guid: b4f1c52a4d9acc94da08e9006d9fd5e0, type: 3}
propertyPath: m_LocalPosition.z
value: 0.04261017
value: 0.12299919
objectReference: {fileID: 0}
- target: {fileID: 3674349604157782260, guid: b4f1c52a4d9acc94da08e9006d9fd5e0, type: 3}
propertyPath: m_LocalRotation.w
@ -14688,6 +14688,14 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 90
objectReference: {fileID: 0}
- target: {fileID: 9082827438125951081, guid: ab468a82ad445da4e9a084297505261f, type: 3}
propertyPath: m_LocalPosition.x
value: -0.009
objectReference: {fileID: 0}
- target: {fileID: 9082827438125951081, guid: ab468a82ad445da4e9a084297505261f, type: 3}
propertyPath: m_LocalPosition.y
value: 0.8
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: ab468a82ad445da4e9a084297505261f, type: 3}
--- !u!4 &802860442 stripped
@ -15012,7 +15020,7 @@ Transform:
- {fileID: 2128333932}
- {fileID: 197140882}
m_Father: {fileID: 45957245}
m_RootOrder: 6
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &815680570
PrefabInstance:
@ -15114,7 +15122,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3674349604157782260, guid: b4f1c52a4d9acc94da08e9006d9fd5e0, type: 3}
propertyPath: m_LocalPosition.z
value: 0.04261017
value: 0.11899948
objectReference: {fileID: 0}
- target: {fileID: 3674349604157782260, guid: b4f1c52a4d9acc94da08e9006d9fd5e0, type: 3}
propertyPath: m_LocalRotation.w
@ -16555,7 +16563,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3674349604157782260, guid: b4f1c52a4d9acc94da08e9006d9fd5e0, type: 3}
propertyPath: m_LocalPosition.z
value: 0.04261017
value: 0.11899948
objectReference: {fileID: 0}
- target: {fileID: 3674349604157782260, guid: b4f1c52a4d9acc94da08e9006d9fd5e0, type: 3}
propertyPath: m_LocalRotation.w
@ -17592,7 +17600,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3674349604157782260, guid: b4f1c52a4d9acc94da08e9006d9fd5e0, type: 3}
propertyPath: m_LocalPosition.z
value: 0.04261017
value: 0.12299919
objectReference: {fileID: 0}
- target: {fileID: 3674349604157782260, guid: b4f1c52a4d9acc94da08e9006d9fd5e0, type: 3}
propertyPath: m_LocalRotation.w
@ -18672,7 +18680,7 @@ Transform:
- {fileID: 804182423}
- {fileID: 1043384080}
m_Father: {fileID: 45957245}
m_RootOrder: 19
m_RootOrder: 13
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1180503447
PrefabInstance:
@ -22509,6 +22517,11 @@ Transform:
m_CorrespondingSourceObject: {fileID: 7304097665698855045, guid: 7520016a817d68f4685d157d457ebed1, type: 3}
m_PrefabInstance: {fileID: 1569982188}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1573644873 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2835658414891243653, guid: ec717aa9a84ac1849bec0aa4f4b89314, type: 3}
m_PrefabInstance: {fileID: 1989420947}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1582617698
PrefabInstance:
m_ObjectHideFlags: 0
@ -23752,7 +23765,7 @@ Transform:
- {fileID: 1695254331}
- {fileID: 1180503448}
m_Father: {fileID: 45957245}
m_RootOrder: 5
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1727196003
PrefabInstance:
@ -23787,7 +23800,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3674349604157782260, guid: b4f1c52a4d9acc94da08e9006d9fd5e0, type: 3}
propertyPath: m_LocalPosition.z
value: 0.04261017
value: 0.11899948
objectReference: {fileID: 0}
- target: {fileID: 3674349604157782260, guid: b4f1c52a4d9acc94da08e9006d9fd5e0, type: 3}
propertyPath: m_LocalRotation.w
@ -28128,7 +28141,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3674349604157782260, guid: b4f1c52a4d9acc94da08e9006d9fd5e0, type: 3}
propertyPath: m_LocalPosition.z
value: 0.04261017
value: 0.12299919
objectReference: {fileID: 0}
- target: {fileID: 3674349604157782260, guid: b4f1c52a4d9acc94da08e9006d9fd5e0, type: 3}
propertyPath: m_LocalRotation.w
@ -28197,7 +28210,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1888977163}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.077, y: -0.821, z: 1.791}
m_LocalPosition: {x: 0.077, y: -0.821, z: 1.691}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -30181,6 +30194,22 @@ Transform:
m_CorrespondingSourceObject: {fileID: 589337997038399236, guid: ec717aa9a84ac1849bec0aa4f4b89314, type: 3}
m_PrefabInstance: {fileID: 1989420947}
m_PrefabAsset: {fileID: 0}
--- !u!54 &1989420950
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1573644873}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!1001 &2030655353
PrefabInstance:
m_ObjectHideFlags: 0

View File

@ -1,6 +1,4 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using Valve.VR;
using Valve.VR.Extras;
using Valve.VR.InteractionSystem;
@ -79,6 +77,11 @@ public class FurnitureMover : MonoBehaviour
Ray SnapRaycast = new Ray(transform.position, transform.forward);
RaycastHit SnapHit;
//TODO Check if object is on walls
if (Grabbing.wallMount)
{
}
bool SnapbHit = Physics.Raycast(SnapRaycast, out SnapHit, 100f, AutoPlacementEnvironmentMask);
if (SnapbHit && Grabbing != null)
@ -145,12 +148,9 @@ public class FurnitureMover : MonoBehaviour
}
pointer.transform.localPosition = new Vector3(0f, 0f, dist / 2f);
if(Grabbing != null && snapLeftAction != null && snapRightAction != null && snapLeftAction.activeBinding && snapRightAction.activeBinding)
//Rotate Logic
if (Grabbing != null && snapLeftAction != null && snapRightAction != null && snapLeftAction.activeBinding && snapRightAction.activeBinding)
{
bool leftHandTurnLeft = snapLeftAction.GetStateDown(hand.handType);
bool rightHandTurnLeft = snapLeftAction.GetStateDown(hand.otherHand.handType);
@ -234,13 +234,13 @@ public class FurnitureMover : MonoBehaviour
private void OnPointerIn(object sender, PointerEventArgs e)
{
if (Grabbing != null) return;
MovableFurniturePart pointerEnterHandler = e.target.GetComponent<MovableFurniturePart>();
if (pointerEnterHandler == null)
{
return;
}
pointerEnterHandler.OnPointerEnter();
}
}

View File

@ -8,6 +8,7 @@ public class MovableFurniture : Furniture
private Rigidbody _rigidbody;
public bool wallMount;
private bool isColliding = false;
// Start is called before the first frame update
new void Start()
{
@ -22,7 +23,7 @@ public class MovableFurniture : Furniture
var outline = child.gameObject.AddComponent<ObjectOutline>();
if (!outline) continue;
outlines.Add(outline);
outline.OutlineMode = ObjectOutline.Mode.OutlineAll;
outline.OutlineMode = ObjectOutline.Mode.OutlineVisible;
outline.OutlineColor = Color.yellow;
outline.OutlineWidth = 5f;
outline.enabled = false;
@ -59,7 +60,7 @@ public class MovableFurniture : Furniture
/*child.OutlineMode = ObjectOutline.Mode.OutlineAll;
child.OutlineColor = Color.yellow;
child.OutlineWidth = 5f;*/
outline.enabled = true;
//outline.enabled = true;
}
}
@ -67,7 +68,7 @@ public class MovableFurniture : Furniture
{
foreach (ObjectOutline outline in outlines)
{
outline.enabled = false;
//outline.enabled = false;
}
}
@ -96,6 +97,9 @@ public class MovableFurniture : Furniture
{
Vector3 previousPosition = transform.position;
Vector3 offset = Vector3.zero;
//if (isColliding) { return; }
transform.position = position;
return;
if (wallMount)
{
transform.position = position;
@ -149,21 +153,54 @@ public class MovableFurniture : Furniture
void OnDrawGizmos()
{
// Draw a yellow sphere at the transform's position
Gizmos.color = Color.red;
/*Gizmos.color = Color.red;
Gizmos.DrawWireCube(transform.position - centerOffset, combinedBounds.size);
Gizmos.DrawRay((transform.position - centerOffset) - (new Vector3(0, 0, combinedBounds.extents.z)), (new Vector3(0, 0, combinedBounds.size.z)));
Gizmos.DrawRay((transform.position - centerOffset) - (new Vector3(0, 0, combinedBounds.extents.z)), (new Vector3(0, 0, combinedBounds.size.z)));*/
}
private void OnDisable()
{
if(outlines != null && outlines.Count > 0)
if (outlines != null && outlines.Count > 0)
{
foreach (ObjectOutline outline in outlines)
{
outline.enabled = false;
}
}
}
//Check if collision before moving an object
public void OnFurnitureCollisionEnter(Collider other)
{
/*foreach (ObjectOutline outline in outlines)
{
outline.OutlineColor = Color.red;
outline.enabled = true;
}
isColliding = true;*/
}
public void OnFurnitureCollisionStay(Collider other)
{
//isColliding = true;
}
public void OnFurnitureCollisionExit(Collider other)
{
//Run CheckFurnitureCollisions on next FixedUpdate loop. If no object is truly colliding, isColliding should be false inside CheckFurnitureCollisions
/*Invoke("CheckFurnitureCollisions", Time.fixedTime * 2);
isColliding = false;*/
}
private void CheckFurnitureCollisions()
{
if (isColliding == true) return;
foreach (ObjectOutline outline in outlines)
{
outline.OutlineColor = Color.yellow;
outline.enabled = false;
}
}
}

View File

@ -1,7 +1,4 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class MovableFurniturePart : MonoBehaviour
{
@ -32,4 +29,19 @@ public class MovableFurniturePart : MonoBehaviour
{
parent.OnPointerExit();
}
private void OnTriggerEnter(Collider other)
{
parent.OnFurnitureCollisionEnter(other);
}
private void OnTriggerExit(Collider other)
{
parent.OnFurnitureCollisionExit(other);
}
private void OnTriggerStay(Collider other)
{
parent.OnFurnitureCollisionStay(other);
}
}

View File

@ -18,7 +18,7 @@ PhysicsManager:
m_ClothInterCollisionDistance: 0
m_ClothInterCollisionStiffness: 0
m_ContactsGeneration: 1
m_LayerCollisionMatrix: 7fffffff7fffffff7fffffffffffffff7fffffff7fffffff7fffffff88ffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffff
m_LayerCollisionMatrix: 7ffdffff7ffdffff7ffdffffffffffff7ffdffff7ffdffff7ffdffff88fdff7fffffffff08ffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffdffff
m_AutoSimulation: 1
m_AutoSyncTransforms: 0
m_ReuseCollisionCallbacks: 1

View File

@ -7,6 +7,7 @@ TagManager:
- SamplesInfoPanel
- projectile
- FxTemporaire
- FurnitureTrigger
layers:
- Default
- TransparentFX
@ -17,7 +18,7 @@ TagManager:
- Static Lighting
- Teleport Area
- Environment
-
- FurnitureTrigger
-
-
-