private void UpdatedOnPlaneWhenEnter(Collider other) { MonoPlane plane = other.GetComponent <MonoPlane>(); if (!plane) { onPlane = false; } else { onPlane = true; } }
private void UpdatedOnPlaneWhenExit(Collider other) { MonoPlane plane = other.GetComponent <MonoPlane>(); if (!plane) { return; } else { onPlane = false; } }
public float ErrorVelocityOnGround(MonoPlane plane) { return(Mathf.Abs(Velocity.magnitude - VelocityOnGround(plane))); }
//Assuming the initial velocity is 0 public float VelocityOnGround(MonoPlane plane) { return(Mathf.Sqrt((2 * Physics.gravity.magnitude) * (transform.position.y - plane.transform.position.y))); }