/// <summary> /// Do Euler physics each tick /// </summary> void Update() { CalcHorizontalMovement(); CalcVerticalMovement(); //applying our velocity to our position transform.position += velocity * Time.deltaTime; aabb.RecalcAABB(); isGrounded = false; }
/// <summary> /// Do Euler physics each tick /// </summary> void Update() { if (Time.deltaTime > 0.25f) { return; // lag spike? quit early, do nothing } CalcHorizontalMovement(); CalcVerticalMovement(); //applying our velocity to our position transform.position += velocity * Time.deltaTime; aabb.RecalcAABB(); isGrounded = false; }