protected virtual void OnDrawGizmos() { Gizmos.color = Color.yellow; Gizmos.matrix = transform.localToWorldMatrix; Vector3 origin = HingeLocation; Vector3 direction = (DriveAxis.GetAxisDirection(true) * (gizmoLineDistance * 0.5f)); Vector3 from = origin - direction; Vector3 to = origin + direction; Gizmos.DrawLine(from, to); Gizmos.DrawSphere(from, gizmoSphereRadius); Gizmos.DrawSphere(to, gizmoSphereRadius); }
protected virtual void OnDrawGizmos() { Gizmos.color = Color.yellow; Gizmos.matrix = transform.localToWorldMatrix; Vector3 origin = transform.localPosition; Vector3 direction = (DriveAxis.GetAxisDirection(true) * (DriveLimit * 0.5f)); Vector3 from = origin - direction; Vector3 to = origin + direction; Gizmos.DrawLine(from, to); Gizmos.DrawCube(from, gizmoCubeSize); Gizmos.DrawCube(to, gizmoCubeSize); }