private void OnDrawGizmosSelected() { // var refPos = transform.TransformPoint(center); // var refRot = referenceBone.rotation * Quaternion.FromToRotation(Vector3.up, GetDirectionFromInt(direction)); // // Gizmos.color = Color.blue; // GizmosEx.DrawWireCapsule(refPos, refRot, radius, height + radius * 2); var pos = transform.TransformPoint(center); var rot = transform.rotation * Quaternion.FromToRotation(Vector3.up, GetDirectionFromInt(direction)); Gizmos.color = Color.red; GizmosEx.DrawWireCapsule(pos, rot, radius, height + radius * 2); if (Rigidbody == null) { return; } Gizmos.color = Color.gray; Gizmos.DrawSphere(transform.TransformPoint(Rigidbody.centerOfMass), 0.05f); }