public static void DrawBounds(Transform transform) { Bounds bounds = transform.GetBounds(true, false, true); Vector3 lossyScale = transform.get_lossyScale(); Quaternion rotation = transform.get_rotation(); Vector3 pos = Vector3.op_Addition(transform.get_position(), Quaternion.op_Multiply(rotation, Vector3.Scale(lossyScale, ((Bounds) ref bounds).get_center()))); Vector3 size = Vector3.Scale(lossyScale, ((Bounds) ref bounds).get_size()); GizmosUtil.DrawCube(pos, size, rotation); GizmosUtil.DrawWireCube(pos, size, rotation); }
public static void DrawBounds(Transform transform) { Bounds bounds = transform.GetBounds(true, false, true); Vector3 vector3 = transform.lossyScale; Quaternion quaternion = transform.rotation; Vector3 vector31 = transform.position + (quaternion * Vector3.Scale(vector3, bounds.center)); Vector3 vector32 = Vector3.Scale(vector3, bounds.size); GizmosUtil.DrawCube(vector31, vector32, quaternion); GizmosUtil.DrawWireCube(vector31, vector32, quaternion); }
private void DrawGizmos() { Vector3 vector3 = base.transform.lossyScale; Quaternion quaternion = base.transform.rotation; Vector3 vector31 = base.transform.position + (quaternion * Vector3.Scale(vector3, this.Center)); Vector3 vector32 = Vector3.Scale(vector3, this.Size); Gizmos.color = new Color(0.5f, 0.5f, 0.5f, 0.5f); GizmosUtil.DrawCube(vector31, vector32, quaternion); GizmosUtil.DrawWireCube(vector31, vector32, quaternion); }
private void DrawGizmos() { Vector3 lossyScale = ((Component)this).get_transform().get_lossyScale(); Quaternion rotation = ((Component)this).get_transform().get_rotation(); Vector3 pos = Vector3.op_Addition(((Component)this).get_transform().get_position(), Quaternion.op_Multiply(rotation, Vector3.Scale(lossyScale, this.Center))); Vector3 size = Vector3.Scale(lossyScale, this.Size); Gizmos.set_color(new Color(0.5f, 0.5f, 0.5f, 0.5f)); GizmosUtil.DrawCube(pos, size, rotation); GizmosUtil.DrawWireCube(pos, size, rotation); }
private void OnDrawGizmosSelected() { //Dibujar el area del acelerador GizmosUtil.DrawWireCube(transform.position, transform.rotation, areaSize); }