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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
		public override AABB GetShapeBounds()
		{
			return ShapeSettings.CalculateBounds(Quaternion.identity, gridTangent, gridBinormal);
		}