Wrong lizard stop

Hi Jonas,

Welcome to our community! :slight_smile:

Have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture? Make sure that the code of the Lizard does not accidentally call FindObjectOfType when it is supposed to call GetComponent. Also check the size of the colliders. They must not overlap “wrong” lanes.

If you cannot find a problem, try to set the Sleep Mode of the Lizard’s Rigidbody2D component to “Never Sleep”. In some cases, the Rigidbody2D components gets set to “sleep” during runtime, and the Lizard suddenly does not collide with anything anymore.

Did this help?


See also: