-
Notifications
You must be signed in to change notification settings - Fork 268
Open
Labels
Description
Slicing a sphere created with Unity's right click>3D Object>Sphere, with identity transform with planeWorldPosition = Vector3.zero and planeWorldDirection = Vector3.right results in hemisphere meshes with holes.
When I rotate the sphere 5 degrees along the y axis, it doesn't happen.
This happens in master at commit b93d68c Unity Version 2019.3.5f1 (d691e07d38ef) Personal
This doesn't happen on release 1.0.0
Script used for slicing:
using EzySlice;
using UnityEngine;
public class SliceOnClick : MonoBehaviour
{
public Material innerMaterial;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
void OnMouseDown()
{
Debug.Log("CUTTING");
if (this.Slice(Vector3.zero, Vector3.right) == null)
{
Debug.Log("FAILED");
}
Debug.Log("WORKED");
}
public GameObject[] Slice(Vector3 planeWorldPosition, Vector3 planeWorldDirection)
{
return this.gameObject.SliceInstantiate(planeWorldPosition, planeWorldDirection, CalculateCustomRegion(0, 0, 512, 512), this.innerMaterial);
}
public TextureRegion CalculateCustomRegion(int px, int py, int width, int height)
{
return this.innerMaterial.GetTextureRegion(px, py, width, height);
}
}
PD: Thank you for making this project!

