Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After slicing the game object the original prefab holes are closed , the region is filled? i wanted to know if we can retain the original holes in the obj after slicing the game object ? #43

Closed
fire53base opened this issue May 15, 2021 · 3 comments

Comments

@fire53base
Copy link

`using EzySlice;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Slice_Eg : MonoBehaviour
{
public GameObject plane1,plane2;
// Start is called before the first frame update
public GameObject objectToSlice; // non-null
void Start()
{

}

// Update is called once per frame
void Update()
{
    
}

public void slice_go_on_Click()
{

    GameObject[] first_sliced = Slice(plane2.transform.position, plane2.transform.up);


}



/**
 * Example on how to slice a GameObject in world coordinates.
 */
public GameObject[] Slice(Vector3 planeWorldPosition, Vector3 planeWorldDirection)
{
    return objectToSlice.SliceInstantiate(planeWorldPosition, planeWorldDirection);
}

}
`

@fire53base
Copy link
Author

fire53base commented May 15, 2021

[This is the screen shot of the obj after it is sliced using the above code and material assigned manually after slicing

Screenshot_face_covering
](url)https://drive.google.com/drive/folders/13Kx183lKPVfeFW6-ELYn1QxsyeORDT4Z?usp=sharing[link of sliced obj using ezy slice
]

@fire53base
Copy link
Author

fire53base commented May 15, 2021

[This is the required result after slicing
Sliced obj required
]https://drive.google.com/drive/folders/14-NtFtotwEJk0Jtme7670OMsVD8b0Ysp?usp=sharing[link for obj of the required result]

@fire53base
Copy link
Author

fire53base commented May 15, 2021

[Original Obj link that is scaled and sliced]:

(url)https://drive.google.com/drive/folders/11howaZZ3DqQd5e3P96wKJpTmu8ghK1HK?usp=sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant