Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Game Development How to Make a Video Game Score, Enemies, and Game State Create Enemy Navigation and AI

Bird stop chasing

When I go to the back of the bird, at some point, the bird will stop chasing me. I wonder if anyone has the same problem and how to fix it?

1 Answer

Wesley Trayer
Wesley Trayer
13,812 Points

Yes, it's not really an error, if you check the collision bounds of the bird, you'll see it's composed of two parts: a cylinder and a box. The cylinder is around the bird's feet and the box protrudes in front of it, but nothing extends out behind it. The bird has a relax distance when it gets near the player, so it doesn't overrun the frog. That means that if you get behind the bird, and are inside the relax distance, the bird won't chase you.

I have exploited that before, it's a fun trick. Hope this explanation is clear.


Ohhh I now understand, thank you so much! I have tried to change the relax distance, it's pretty okay now!