public AABB GetShapeBounds(Quaternion rotation) { var bounds = ShapeSettings.CalculateBounds(rotation, gridTangent, gridBinormal); var direction = haveForcedDirection ? forcedDirection : buildPlane.normal; if (editMode == EditMode.ExtrudeShape) { bounds.Extrude(rotation * (direction * Height)); } return(bounds); }
public AABB GetShapeBounds(Quaternion rotation) { if (editMode == EditMode.ExtrudeShape || editMode == EditMode.EditShape) { return(settings.bounds); } var bounds = ShapeSettings.CalculateBounds(rotation, gridTangent, gridBinormal); if (settings.vertices.Length < 3) { bounds.Extend(rotation * worldPosition); } return(bounds); }
public override AABB GetShapeBounds() { return ShapeSettings.CalculateBounds(Quaternion.identity, gridTangent, gridBinormal); }