void DrawParable(Vector2 velocity) { Vector2 start = (Vector2)transform.position; Vector2 end = GizmosExtension.DrawParabel(start, velocity, Physics2D.gravity.y); //Player start Gizmos.DrawWireCube(start, Vector3.one); //Player end Gizmos.DrawWireCube(end, Vector3.one); }
private void OnDrawGizmosSelected() { Gizmos.color = Color.Lerp(Create.debugColor, Color.black, 0.3f); Vector2 start = (Vector2)transform.position + Create.debugOffset * 4; Vector2 velocity = Controller2D.GetJumpSpeed(jumpHeight) * Vector2.up + Create.debugOffset * 2f; Vector2 end = GizmosExtension.DrawParabel(start, velocity, Physics2D.gravity.y); //Block start Gizmos.DrawWireCube(start, Vector3.one); //Block end Gizmos.DrawWireCube(end, Vector3.one); }
private void OnDrawGizmosSelected() { Gizmos.color = Color.Lerp(Manipulate.debugColor, Color.black, 0.3f); Vector2 start = (Vector2)transform.position + Manipulate.debugOffset * 3; Vector2 velocity = (Manipulate.debugOffset + Vector2.up).normalized * speed; Vector2 end = GizmosExtension.DrawParabel(start, velocity, Physics2D.gravity.y); //Block start Gizmos.DrawWireCube(start, Vector3.one); //Trail Gizmos.DrawLine(start, end); //Block end Gizmos.DrawWireCube(end, Vector3.one); }
private void OnDrawGizmos() { Gizmos.color = Color.Lerp(Manipulate.debugColor, Color.black, 0.3f); Vector2 start = (Vector2)transform.position + Manipulate.debugOffset * 2f; Vector2 velocity = Controller2D.GetJumpSpeed(jumpHeight) * Vector2.up + Manipulate.debugOffset * 2f; Vector2 end = GizmosExtension.DrawParabel(start, velocity, Physics2D.gravity.y); //Block Vector2 startBlock = start - velocity.normalized * 2; Gizmos.DrawLine(startBlock, startBlock - velocity); Gizmos.DrawWireCube(startBlock, Vector3.one); //Player Gizmos.color = PlayerController.debugColor; //Player start Gizmos.DrawWireCube(start, Vector3.one); //Player end Gizmos.DrawWireCube(end, Vector3.one); }