E
E
Evgeny Maltsev2015-07-24 20:56:05
Game development
Evgeny Maltsev, 2015-07-24 20:56:05

Speed ​​up button in the game?

Hello, I can’t make an acceleration button in the game so that when I press it, my object accelerates and when some objects collide, it passes through them.
Tried doing it like this:

Player.GetComponent<BoxCollider2D>().enabled = false;
yield return new WaitForSeconds(3);
Player.GetComponent<BoxCollider2D>().enabled = true;

When colliding with objects, it passes through, but I need only with certain objects that have their own tag.

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