Answer the question
In order to leave comments, you need to log in
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);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question