How can I make boundaries disappear with trigger?
Hi! I have meshes around my player. After a few moves, I want to make the boundaries disappear with reference to my moves. How can I make this?
Could you get the mesh collider and then just disable it?
If you had a 2DBoxCollider you could do something like,
private BoxCollider2D box2Dcollider;
void Awake()
{
box2Dcollider = this.gameObject.GetComponent<BoxCollider2D>();
}
and then when you don't want to check for collisions just disable it,
private void DisableCollisions()
{
box2Dcollider.enabled = false;
}
$$anonymous$$aybe apply the same logic with the mesh collider? If possible
Answer by melikeclc · Feb 07, 2017 at 03:30 PM
Hi @Rickywild ! Thank you for the answer. However the problem is I'm a beginner on unity so I don't know how to enable or disable something after something. Could you please tell me how to do this?
I think i've completely misunderstood the question, apologies
Your answer
Follow this Question
Related Questions
Find Objects in Trigger and Effect Player 1 Answer
Box Coillider changes to trigger depending on speed of the object. 0 Answers
Level Unlock Help 0 Answers
OnTriggerEnter not working 2 Answers