Skip to content
Snippets Groups Projects
Commit 4e645f2a authored by roysam's avatar roysam
Browse files

log

parent 65bb201d
No related branches found
No related tags found
No related merge requests found
...@@ -29,13 +29,12 @@ public class water_level : MonoBehaviour ...@@ -29,13 +29,12 @@ public class water_level : MonoBehaviour
{ {
float fill = rend.material.GetFloat("_fill"); float fill = rend.material.GetFloat("_fill");
//Debug.Log(fill); Debug.Log(fill);
if (fill < 1f && is_pouring) if (fill < 1f && is_pouring)
{ {
Debug.Log("Filling"); Debug.Log("Filling");
Debug.Log(1 * Time.deltaTime); rend.material.SetFloat("_fill", fill + 1000* Time.deltaTime);
rend.material.SetFloat("_fill", fill + 0.1f* Time.deltaTime);
Debug.Log(rend.material.GetFloat("_fill")); Debug.Log(rend.material.GetFloat("_fill"));
mass = rend.material.GetFloat("_fill")* 0.5f; mass = rend.material.GetFloat("_fill")* 0.5f;
gameObject.GetComponent<own_temp>().temp = (gameObject.GetComponent<own_temp>().temp * gameObject.GetComponent<Rigidbody>().mass + mass * 26) / (mass + gameObject.GetComponent<Rigidbody>().mass); gameObject.GetComponent<own_temp>().temp = (gameObject.GetComponent<own_temp>().temp * gameObject.GetComponent<Rigidbody>().mass + mass * 26) / (mass + gameObject.GetComponent<Rigidbody>().mass);
...@@ -53,7 +52,7 @@ public class water_level : MonoBehaviour ...@@ -53,7 +52,7 @@ public class water_level : MonoBehaviour
// } // }
//} //}
//is_pouring = false; //is_pouring = false;
gameObject.GetComponent<Rigidbody>().mass = beaker.GetComponent<Rigidbody>().mass - init_mass + 0.000001f; gameObject.GetComponent<Rigidbody>().mass = beaker.GetComponent<Rigidbody>().mass - init_mass + 0.000001f;
} }
} }
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