Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialKristian Terziev
28,449 PointsWhat exactly is our collision detector?
Up until now, we didn't see much of the whole field and where the frog is moving to. But now that we've set the camera to follow the frog, I see it doesn't go through the stones and logs. I went over the code we wrote and I can't see us doing any collision detection and restrictions. I might have missed something in the previous videos, but could you explain to me how exactly do we restrict the frog from going through objects?
2 Answers
Emily Peregrine
16,848 PointsUnity makes it's gameobject's use components , It provides some built in components. Some of these are todo with Unity's physics engine, the important one's being a Rigidbody
and a Collider
. The collider is a base component, so there are many different Colliders: BoxCollider, SphereCollider, PolygonCollider. You don't see any collision code because it's packaged in the component
Kristian Terziev
28,449 PointsThank you for the info :)