forked from cgvr/DeltaVR
fixed bug with shape scanner destroying not whole scannable object, deleted Parent-GeneratedModel objects from scene
This commit is contained in:
@@ -40,9 +40,10 @@ public class ShapeScannerRay : MonoBehaviour
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.gameObject.tag == scannableTag)
|
||||
if (other.gameObject.CompareTag(scannableTag))
|
||||
{
|
||||
collidingObjects.Add(other.gameObject);
|
||||
GameObject parent = other.transform.parent.gameObject;
|
||||
collidingObjects.Add(parent);
|
||||
// Only activate when this was the first object that entered collision
|
||||
if (collidingObjects.Count == 1)
|
||||
{
|
||||
@@ -64,9 +65,10 @@ public class ShapeScannerRay : MonoBehaviour
|
||||
|
||||
private void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (other.gameObject.tag == "ShapeScannable")
|
||||
if (other.gameObject.CompareTag(scannableTag))
|
||||
{
|
||||
collidingObjects.Remove(other.gameObject);
|
||||
GameObject parent = other.transform.parent.gameObject;
|
||||
collidingObjects.Remove(parent);
|
||||
if (collidingObjects.Count == 0)
|
||||
{
|
||||
foreach (MeshRenderer meshRenderer in meshRenderers)
|
||||
|
||||
Reference in New Issue
Block a user