S
S
SkrinV2019-11-15 17:51:35
augmented reality
SkrinV, 2019-11-15 17:51:35

Is it possible to create code where contacting objects do an action in Unity with the support of Vuforia?

And so, I created a script that should "Destroy" (in general, any action can be done later, but this is for verification) 2 objects when they touch, but if the script works in normal 3D, then it does not work at all in AR
Here is the script

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Del : MonoBehaviour
{
    public GameObject bullet;
    public GameObject cel;
    // Start is called before the first frame update

    void OnCollisionEnter(Collision col)
    {
        if (col.gameObject.name == "Card")
        {
            Destroy(col.gameObject, 0.1f); 
        }
        Destroy(gameObject, 0.1f); 
    }
}

The fact that they are not destroyed in AR
5dcebab5e5c9f165846144.png
And also the fact that it does not work in the scene
5dcebb31592e4826133973.png
Is it possible to fix this somehow? (Unity 2019 3.0a8, and Vuforia is the latest version)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question