// Update is called once per frame void Update() { gravedad1 = gravedad1; if (contador.b_instanciar == 1) { // gravedad = new Vector3(0, 2, 0); //Debug.Log(gravedad1); FalconUnity.applyForce(0, -gravedad1, 0.2f); } }
void push() { FalconUnity.getTipPosition(0, out pos); //if (Mathf.Abs(pos.z - wall) > 0.15f) // FalconUnity.setForceField(0, 500 * Vector3.back); //FalconUnity.applyForce(0, 50*(pos.z-wall) * Vector3.back, 0.0001f); // FalconUnity.setForceField(0, 1000*(pos.z-wall) * Vector3.back); //else // FalconUnity.setForceField(0, Vector3.zero); FalconUnity.applyForce(0, k * pos.z * Vector3.back, 0.001f); }
// Update is called once per frame void Update() { contador.peso = -slider.value; //Debug.Log(contador.peso); gravedad = new Vector3(0, contador.peso, 0); if (contador.pieza == 1) { if (aux == 1) { p1.gameObject.transform.position = new Vector3(esfera.transform.localPosition.x, esfera.transform.localPosition.y, esfera.transform.localPosition.z); FalconUnity.applyForce(0, gravedad, 0.2f); } } else { if (aux == 1) { Behaviour halo = (Behaviour)p1.GetComponent("Halo"); halo.enabled = false; figura.enabled = true; aux = 0; prueba = "" + pieza + " (1)"; if (prueba == referencia) { r1 = GameObject.Find(referencia); p1.gameObject.transform.position = r1.gameObject.transform.position; Debug.Log("bien"); buenas++; contador.piezasbuenas = buenas; source.PlayOneShot(pibuenas, 1F); } else { Debug.Log("mal"); malas++; contador.piezasmalas = malas; contador.errores = malas; source.PlayOneShot(pimalas, 1F); } } } contador.piezaagarrada = aux; }
// Use this for initialization void Start() { FalconUnity.applyForce(0, constantforce, 0.01f); peso = 0; timebase = 0; }
private static void PiscaHaptic() { FalconUnity.applyForce(0, new Vector3(1, 1, 1), 0.5f); }