Disabling gravity while moving objects, but re-enabling it later.

parent ae5291f3
......@@ -1675,8 +1675,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Cupboard
asset: {fileID: 0}
assetPath:
asset: {fileID: -927199367670048503, guid: 4e0ae2e62c96f433591408dd3b64c4ac, type: 3}
assetPath: kenney.nl/kitchenCabinetDrawer.dae
showExtents: 0
--- !u!65 &385145546
BoxCollider:
......@@ -1723,8 +1723,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE-OBJ.owl#Pot
asset: {fileID: 0}
assetPath:
asset: {fileID: -927199367670048503, guid: 50ace4fd288b640a0bd5c466ef1eeaff, type: 3}
assetPath: kenney.nl/pot.dae
showExtents: 0
containmentParts:
- {fileID: 1539962813}
......@@ -2783,8 +2783,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Chair
asset: {fileID: 0}
assetPath:
asset: {fileID: -927199367670048503, guid: 9f04a722c75964915b1c9c26398cf517, type: 3}
assetPath: kenney.nl/chairModernFrameCushion.dae
showExtents: 0
--- !u!114 &491616700
MonoBehaviour:
......@@ -4276,8 +4276,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Chair
asset: {fileID: 0}
assetPath:
asset: {fileID: -927199367670048503, guid: 9f04a722c75964915b1c9c26398cf517, type: 3}
assetPath: kenney.nl/chairModernFrameCushion.dae
showExtents: 0
--- !u!114 &747210192
MonoBehaviour:
......@@ -4744,8 +4744,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Apple
asset: {fileID: 0}
assetPath:
asset: {fileID: -927199367670048503, guid: 42b009fe643e74211a66f2e8c2ffef39, type: 3}
assetPath: kenney.nl/apple.dae
showExtents: 0
--- !u!114 &851663885
MonoBehaviour:
......@@ -8716,8 +8716,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Cup
asset: {fileID: 0}
assetPath:
asset: {fileID: -927199367670048503, guid: 62d20a2e159844c188958540a442cfe7, type: 3}
assetPath: kenney.nl/cup.dae
showExtents: 1
--- !u!54 &1331286836
Rigidbody:
......@@ -8748,8 +8748,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#DesignedContainer
asset: {fileID: 0}
assetPath:
asset: {fileID: -927199367670048503, guid: 62d20a2e159844c188958540a442cfe7, type: 3}
assetPath: kenney.nl/cup.dae
showExtents: 0
containmentParts:
- {fileID: 806307879}
......@@ -8899,7 +8899,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#DesignedContainer
asset: {fileID: -927199367670048503, guid: eff57e304920c49d38fdf5ba083866ca, type: 3}
assetPath: Assets/kenney.nl/bowl.dae
assetPath: kenney.nl/bowl.dae
showExtents: 0
containmentParts:
- {fileID: 620090203}
......@@ -9228,7 +9228,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#DesignedContainer
asset: {fileID: -927199367670048503, guid: a49e84f3fab144d5ba0da1c05ef8a9e0, type: 3}
assetPath: Assets/kenney.nl/plate.dae
assetPath: kenney.nl/plate.dae
showExtents: 0
containmentParts: []
--- !u!114 &1361312762
......@@ -10431,7 +10431,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
is_a: http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#Entity
asset: {fileID: -927199367670048503, guid: 7e19c7fa54d63440f833344412158ac5, type: 3}
assetPath: Assets/kenney.nl/iceCreamScoop.dae
assetPath: kenney.nl/iceCreamScoop.dae
showExtents: 0
--- !u!114 &1476147914
MonoBehaviour:
......@@ -10959,8 +10959,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Countertop
asset: {fileID: 0}
assetPath:
asset: {fileID: -927199367670048503, guid: b24e0aab37074449abb8d26e63183ea6, type: 3}
assetPath: kenney.nl/kitchenCabinetCornerInner.dae
showExtents: 0
--- !u!114 &1656686362
MonoBehaviour:
......@@ -12241,8 +12241,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Chair
asset: {fileID: 0}
assetPath:
asset: {fileID: -927199367670048503, guid: 9f04a722c75964915b1c9c26398cf517, type: 3}
assetPath: kenney.nl/chairModernFrameCushion.dae
showExtents: 0
--- !u!114 &1887977819
MonoBehaviour:
......@@ -12392,8 +12392,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE-OBJ.owl#Lid
asset: {fileID: 0}
assetPath:
asset: {fileID: -927199367670048503, guid: 777930a286a884240885b925f58479dc, type: 3}
assetPath: kenney.nl/potLid.dae
showExtents: 0
--- !u!4 &1903869703 stripped
Transform:
......@@ -12587,8 +12587,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Table
asset: {fileID: 0}
assetPath:
asset: {fileID: -927199367670048503, guid: 84f629846b5a741ea896945c0dff90b1, type: 3}
assetPath: kenney.nl/tableGlass.dae
showExtents: 0
--- !u!114 &1918559640
MonoBehaviour:
......@@ -12697,8 +12697,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Chair
asset: {fileID: 0}
assetPath:
asset: {fileID: -927199367670048503, guid: 9f04a722c75964915b1c9c26398cf517, type: 3}
assetPath: kenney.nl/chairModernFrameCushion.dae
showExtents: 0
--- !u!114 &1928384765
MonoBehaviour:
......@@ -13635,8 +13635,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Countertop
asset: {fileID: 0}
assetPath:
asset: {fileID: -927199367670048503, guid: 39dde2e26fdc3461396fc5c3e8634457, type: 3}
assetPath: kenney.nl/kitchenCabinetCornerRound.dae
showExtents: 0
--- !u!114 &2072914416
MonoBehaviour:
......@@ -14230,8 +14230,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Cupboard
asset: {fileID: 0}
assetPath:
asset: {fileID: -927199367670048503, guid: 1b6a6d2a21f3544ea8b78f5aede388f2, type: 3}
assetPath: kenney.nl/kitchenCabinet.dae
showExtents: 0
--- !u!65 &2138028497
BoxCollider:
......
......@@ -211,19 +211,21 @@ public class SceneController : MonoBehaviour
arguments[mt.path] = new Transform[]{midPointGO.transform, targetGO.transform};
arguments[mt.speed] = speed;
arguments[mt.oncomplete] = "ActionParticipantDone";
arguments[mt.oncompleteparams] = referenceName;
arguments[mt.oncompleteparams] = (referenceName, participantGO);
arguments[mt.oncompletetarget] = gameObject;
participantGO.GetComponent<Rigidbody>().useGravity = false;
iTween.MoveTo(participantGO, arguments);
}
timeToTimeout = timeoutAfterSeconds;
yield return WaitForActionsOrTimeout();
}
public void ActionParticipantDone(string referenceName)
public void ActionParticipantDone((string name, GameObject go) reference)
{
Debug.Log($"{referenceName} is done.");
actionParticipants[referenceName] = true;
Debug.Log($"{reference.name} is done.");
actionParticipants[reference.name] = true;
reference.go.GetComponent<Rigidbody>().useGravity = true;
}
public IEnumerator WaitForActionsOrTimeout()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment