Skip to content
Snippets Groups Projects
Commit 2c9b7bb2 authored by Samrendra Roy's avatar Samrendra Roy
Browse files

physics test

parent 9c0605c4
No related branches found
No related tags found
No related merge requests found
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;
public class onsqueeze : MonoBehaviour
{
public GameObject waterpour;
public GameObject dropper;
public bool squeez;
public bool sdw;
private int state = 0;
private Vector3 rot;
// Start is called before the first frame update
......@@ -23,6 +25,25 @@ public class onsqueeze : MonoBehaviour
waterpour.SetActive(false);
gameObject.transform.eulerAngles = rot;
}
if(gameObject.transform.localEulerAngles.z > 45 && squeez)
{
waterpour.SetActive(true);
}
else
{
waterpour.SetActive(false);
}
}
public void OnButtonPress(XRBaseInteractor interactor)
{
squeez = true;
}
public void OnButtonRelease(XRBaseInteractor interactor)
{
squeez = false;
}
private void OnMouseOver()
{
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class testphysics : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
void Abc()
{
//physics
}
}
fileFormatVersion: 2
guid: 88a7d9c80c1c58c499990200550cf64e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment