WireCap EndPos interaction affordance + bugfixes, reset of fallen objects, button movement
This commit is contained in:
1 parent
7de0125751
commit
085d330a87
49 files changed
+13501
-12062
No files matched your search
@@ -6,31 +6,60 @@ public class MaterialRopeDetachAction : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
Vector3 InitialCords;
|
||||
[SerializeField]
|
||||
Quaternion InitialRotation;
|
||||
[SerializeField]
|
||||
Quaternion InitialRotation;
|
||||
//Rope Rope;
|
||||
|
||||
bool resetAsked = false;
|
||||
|
||||
XRGrabInteractable grabComponent;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
grabComponent = gameObject.GetComponent<XRGrabInteractable>();
|
||||
//InitialCords = transform.localPosition;
|
||||
//InitialRotation = gameObject.transform.rotation;
|
||||
//Rope = gameObject.GetComponentInChildren<Rope>();
|
||||
//InvokeRepeating("DebugSender", 0f, 1f);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
void LateUpdate()
|
||||
{
|
||||
|
||||
//Debug.Log(grabComponent.interactorsSelecting);
|
||||
if (resetAsked)
|
||||
{
|
||||
Invoke("InvokedReset", 0.5f);
|
||||
resetAsked = false;
|
||||
}
|
||||
}
|
||||
|
||||
void DebugSender()
|
||||
{
|
||||
Debug.Log("Ôóíêöèÿ âûçâàíà â: " + Time.time + "\n" + grabComponent.interactorsSelecting.Count);
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
// Îñòàíîâèòü âûçîâû ïðè óíè÷òîæåíèè îáúåêòà
|
||||
CancelInvoke("DebugSender");
|
||||
}
|
||||
|
||||
public void reset()
|
||||
{
|
||||
//transform.localPosition = InitialCords;
|
||||
//transform.rotation = InitialRotation;
|
||||
//Rope.RecalculateRope();
|
||||
// gameObject.GetComponent<XRGrabInteractable>().interactionManager.
|
||||
//Invoke("InvokedReset", 0.1f);
|
||||
resetAsked = true;
|
||||
|
||||
}
|
||||
|
||||
private void InvokedReset() {
|
||||
transform.localPosition = InitialCords;
|
||||
transform.rotation = InitialRotation;
|
||||
//Rope.RecalculateRope();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user