- Home /
Question by
loveurara14 · Apr 10 at 04:30 PM ·
destroydestroy object
A* Pathfinding How to destroy seeker,A* Pathfinding What command to destroy seeker
My seeker doesn't get destroyed when approaching a target. I want Seeker to get close to the target and seeker disappears. I don't know what command I should use to order the seeker to destroy or enable=false.
Now I use the command
public void OnTriggerEnter2D(Collider2D collision)
{
if (collision.gameObject.CompareTag("Player"))
{
destroy(gameobject);
}
}
into another script and it not working.
I'm a beginner who looks at the basics use 2D PATHFINDING on YouTube .
,
Comment
Your answer