Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Add the OnTriggerEnter method, throw the script on the object that will be deleted, select the floor, click on the button with tags and select add tag , a window will open and there you add the floor tag, or you can call it differently in the script in the OnTriggerEnter method, write
void OnTriggerEnter(Collider other)
{
if(other.gameobject.tag == “floor”)
{
Destroy(this)
}
}
I saw a lesson in which rays were used for this. We draw the beam from the past position to the current one and if there is a floor in its path, we remove it. (In this case, the object will be removed even at high speed) There it was used for bullets.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question